←back to thread

115 points nonfamous | 1 comments | | HN request time: 0.207s | source
Show context
nemothekid ◴[] No.44567382[source]
If I'm reading this correctly, then AWS Support dropped the ball here but this isn't a bug in lambda. This is the documented behavior of the lambda runtime.

The document is long, and the examples seem contrived, so anyone is free to correct me but as I understand it the lambda didn't crash, after you returned 201, your lambda instance was put to sleep. You aren't guaranteed that any code will remain running after your lambda "ends". I am not sure why AWS Support was unable to communicate this OP.

If you are using Lambda with a function URL, you aren't guaranteed that anything after you return your http response remains running. I believe Lambda has some callbacks/signals you can listen to, to ensure your function properly cleans up before the Lambda is frozen, but if you want the lambda to return as fast as possible it seems you are better off having your service publish to an SQS queue instead.

replies(5): >>44567412 #>>44567432 #>>44567463 #>>44567479 #>>44567534 #
1. happytoexplain ◴[] No.44567463[source]
Consider that this conversation is even being had - that you are even in the situation to be writing what you are writing.

"Failure" != "Bug"