When debugging a lambda using the AWS Serverless Application Model tooling (the CLI and probably VS Code extensions), you might find that your breakpoint isn’t getting hit and you instead see an error in the debug console:
[ERROR] (rapid) Init failed error=Runtime exited with error: signal: killed InvokeID=" in VS Code
A thing to check is whether you’re running out of RAM or timing out in execution:
- Open your launch.json file for the workspace
- In your configuration, under the
lambda
section, add a specificmemoryMb
value – in my case 512 got me moving
This is incredibly frustrating because the debug console gives you no indication as to why the emulator terminated your lambda – but also helpful, because you can tell how large you need to specify your lambda when you deploy it ahead of time.
Thanks, I had the same issue on one of the new APIs I was building. Bumped it up to 256 from 128 and it was working fine, I wish AWS thew an error that would make more sense.