Overview
Lambda SnapStart improves function performance up to 10x for Java (11+), Python (3.12+) and .NET (8+). It is at no extra cost for Java only; Python and .NET are charged for snapshot caching and restores. It targets slow function initialization (cold starts). Compare with provisioned concurrency.
SnapStart is free only for Java. Python (3.12+) and .NET (8+) are charged for snapshot caching and restores. It is not supported with provisioned concurrency, EFS, or ephemeral storage over 512 MB. The course said no extra cost for all three; the exam may still use the course figure. AWS source
Without SnapStart
An invocation goes through three lifecycle phases:
- Initialize: the function and its environment are initialized. This can take a long time, for example for a Java function.
- Invoke.
- Shutdown.
With SnapStart
- When you publish a new version of the function, Lambda automatically initializes it.
- Lambda takes a snapshot of the memory and disk state.
- Invocations use the snapshot for low latency and go directly to the invoke stage, then shutdown.
| SnapStart disabled | SnapStart enabled | |
|---|---|---|
| Initialization | At invocation time | Pre-initialized at version publish |
| Path | Initialize -> Invoke -> Shutdown | Snapshot -> Invoke -> Shutdown |
Faster Lambda startup for Java, Python or .NET -> SnapStart (free for Java; Python and .NET pay for snapshot caching and restores).
Only Java SnapStart is free; Python and .NET are charged. AWS source
Questions & Answers
Q1: What does SnapStart do?
Answer:
Pre-initializes the function when a version is published and snapshots memory and disk state, so invocations skip the initialize phase.
Q2: Which runtimes and what cost?
Answer:
Java 11+, Python 3.12+, .NET 8+. No extra cost for Java only; Python and .NET are charged for snapshot caching and restores. Up to 10x better performance.
The course said no extra cost for all runtimes. Python and .NET are charged for snapshot caching and restores. AWS source
Check yourself
Quiz
Flashcards
Click the card (or focus it), then use ← → to move and Space to flip.