Open
Description
Expected behavior
When a function crashes for an unexpected reason (fatalError
, memory corruption...), the stack trace and details of the error are not stored/logged/reported to CloudWatch.
I'm fairly new to server-side Swift and AWS in general, so if I'm missing something, feel free to point it out. 🙏
Actual behavior
I would like to have some more informations about the crash, in order to debug and fix crashes in my lambda.
The only details I can see in CloudWatch when my function crashes are:
RequestId: xyz Error: Runtime exited with error: signal: illegal instruction
Runtime.ExitError
Steps to reproduce
- Create a new lambda function
- Make your function crash on purpose (using
fatalError
for instance) - Deploy the function
- Execute it
If possible, minimal yet complete reproducer code (or URL to code)
You can simply use the ErrorHandling
example from this repository.
Send a .fatal
request, causing a crash.
What version of this project (swift-aws-lambda-runtime
) are you using?
1.0.0-alpha
Swift version
The lambda is archived in a docker container using the image swift:5.9.0-amazonlinux2, on the ubuntu-latest
runner (x86_64 architecture).
Amazon Linux 2 docker image version
swift:5.9.0-amazonlinux2