aws / aws-lambda-base-images

Apache License 2.0
648 stars 107 forks source link

Lambda function only logs statements to stderr #12

Open bglowney opened 3 years ago

bglowney commented 3 years ago

Hello,

I use the al2 lambda provided image to run a custom bootstrap that is a Haskell executable. The Haskell executable simply loops forever polling for the next event. I see the lambda provided image uses the emulated runtime. When testing locally in docker I see the runtime's log statements (e.g. request START, request END, billing time, etc) are all printed, but my executable's statements to stdout are not written. If I simply set the output handle with stderr I see all the statements in the logs. Is this expected behavior ? Everywhere else in the documentation I have seen that statements to both stdout and stderr should be captured as logs (and in production then written to cloudwatch).