Skip to content

logger.resetKeys behavior during timeout #3636

Closed Answered by dreamorosi
adxzhang1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @adxzhang1, when there's a timeout the AWS Lambda service shuts down that execution environment and recycles it. So in practice, even if we don't clear the keys the state is lost, and a subsequent request would use another sandbox.

This is documented here:

At some point, suppose your function runs into an invoke failure (such as a function timeout or runtime error). [...] When this happens, the Lambda service performs a reset. The reset behaves like a Shutdown event. First, Lambda shuts down the runtime, then sends a Shutdown event to each registered external extension. The event includes the reason for the shutdown. If this environment is used for a new invocation, Lambda re-initiali…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dreamorosi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants