shiichan

Lambda container image functions finally get SnapStart!

Hi, I'm Shii-chan! This is an update a lot of Lambda users have probably been waiting for.

AWS What's New aws.amazon.com

What was announced?

According to AWS What's New, AWS Lambda now supports SnapStart for functions packaged as container images, reducing startup times from several seconds to as low as sub-second.

SnapStart is an opt-in capability that makes it easier to build highly responsive, scalable applications without provisioning extra resources or implementing complex performance optimizations yourself.

The story so far

Until now, SnapStart was only available for managed runtimes — Python, .NET, and Java. Packaging Lambda functions as container images is a common choice when you want to align with container-based deployment standards, or when you need to bundle larger dependencies, up to 10 GB. But larger container images could take several seconds to start, since Lambda has to download image layers and initialize the runtime and application code. Because SnapStart didn't cover container images, that startup delay was hard to avoid.

What changes

With this update, SnapStart now works for container image functions too. It takes a snapshot of the initialized execution environment at deploy time, caches it, and resumes from that snapshot on invocation instead of initializing from scratch — which is what cuts down startup time so significantly.

This is especially welcome for latency-sensitive workloads like ML inference and interactive APIs.

Dive Deep

It's available in all commercial AWS Regions except Asia Pacific (New Zealand) and Asia Pacific (Taipei).

You can turn it on through several paths:

  • AWS Lambda API
  • AWS Console
  • AWS CLI
  • AWS CloudFormation
  • AWS SAM

You can activate SnapStart for both new and existing container image functions.

Wrap-up

  • Lambda container image functions now support SnapStart
  • Startup time can drop from several seconds to sub-second
  • Previously SnapStart was limited to managed runtimes (Python, .NET, Java)
  • Available in all commercial AWS Regions except Asia Pacific (New Zealand) and Asia Pacific (Taipei)
  • Can be enabled via the API, Console, CLI, CloudFormation, or SAM

This is a great fit if you're bundling larger dependencies into a container image and also want to trim startup latency, like ML inference or interactive API developers.