All Posts

AWS Lambda cold starts are about to get faster

How it works

  1. Download your code.
  2. Initialize the Java runtime.
  3. Initialize your application, which includes initializing any external dependencies and executing any initialization logic your application performs. Which might include downloading static assets from S3, or calling 3rd party services.

Caveats

  • SnapStart only works with Lambda versions, not the $LATEST alias. So when invoking the function, you need to use the full ARN of the SnapStart-enabled version.
  • You can’t enable X-Ray tracing on SnapStart-enabled functions.
  • Network connections that you create during the function’s initialization are not guaranteed when the function is resumed from the snapshot.
  • Any expirable data (e.g. temporary credentials) that you acquire during the function’s initialization is not guaranteed to be valid when the function is resumed from the snapshot.
  • (Randomness) Please refer to the official documentation here to see what you need to do to protect randomness with SnapStart.
  • At the time of launch, SnapStart is only supported on the Amazon Corretto Java 11 runtime.

Performance test

Lumigo supports SnapStart

This may also interest you