AWS Lambda SnapStart For Java Functions


AWS Lambda SnapStart is a new opt-in feature that reduces startup latency for functions running on Amazon Corretto Java 11 runtime. This feature enables developers to achieve up to 10x faster function startup performance for Java functions with minimal or no code changes.

What is the benefit of SnapStart feature?

Reduce startup time by having Lambda cache a snapshot of your function after the function has initialized. To evaluate whether your function code is resilient to snapshot operations.

When SnapStart is enabled, function code is initialized once when a function version is published. Lambda then takes a snapshot of the memory and disk state of the initialized execution environment, persists the encrypted snapshot, and caches it for low-latency access. When the function is first invoked or subsequently scaled, Lambda resumes new execution environments from the persisted snapshot instead of initializing from scratch, improving startup latency.

AWS LAMBDA Function > Configuration > Edit 

If Java Lambda function version < Java 11 version, SnapStart will show disable like below.

AWS Lambda SnapStart For Java Functions

If Java 11 (Corretto) >= version lambda function is there, it will show disable.

AWS Lambda SnapStart For Java Functions

SnapStart pricing

There is no additional charge.

How to do Performance testing?

Traffic pattern and concurrency testing (Example: 1000 requests/sec for 10 seconds) need to be performed to capture the result for both Application with and without the SnapStart enabled for better performance comparison.

Availability of Lambda SnapStart

Currently, Lambda SnapStart is available in the US East (Ohio, N. Virginia), US West (Oregon), Asia Pacific (Singapore, Sydney, Tokyo), and Europe (Frankfurt, Ireland, Stockholm) Regions.

Similar Articles