Lambda Cold Start Estimator
Estimate Lambda cold-start latency from runtime, package size, VPC attachment and init code, and see which factor dominates.
Inputs
Roughly 8 ms per MB to fetch and unpack.
Hyperplane ENI attachment adds roughly 110 ms.
Estimated Cold Start
496ms
First-request Latency
676ms
Cold Starts per Month
100,000
Latency Added per Month
13.8hours
Dominant Contributor
Initialization code outside the handler
Step by step
Values used
Runtime = Node.js 20 — about 150 ms bootstrap; Deployment package size = 12 MB; Initialization code outside the handler = 250 ms; Function is attached to a VPC = No; SnapStart or a pre-warmed snapshot is enabled = No; Warm invocation duration = 180 ms; Invocations per month = 5,000,000 requests; Share of invocations that cold start = 2 %
Lambda Cold Start
cold start ≈ runtime bootstrap + 8 ms per MB of package + 110 ms if VPC-attached + your init code, then multiplied by about 0.25 when SnapStart restores a snapshot.
Estimated Cold Start
= 496 ms
First-request Latency
= 676 ms
Cold Starts per Month
= 100,000
Latency Added per Month
= 13.8 hours
Dominant Contributor
= Initialization code outside the handler
How it works
A cold start is the sum of downloading and unpacking the artefact, booting the runtime and running everything outside your handler. Package download scales with artefact size, VPC attachment adds a fixed network setup cost, and heavy SDK or framework imports usually dominate everything else. The coefficients here are order-of-magnitude figures — read the real numbers from the initDuration field in your CloudWatch REPORT lines. Cold starts land on real user requests at exactly the wrong moment — during a deployment or a traffic spike — so knowing which of the four contributors dominates tells you whether to shrink the package, lazy-load clients, or pay for provisioned concurrency.
Formula
Lambda Cold Start
cold start ≈ runtime bootstrap + 8 ms per MB of package + 110 ms if VPC-attached + your init code, then multiplied by about 0.25 when SnapStart restores a snapshot.
- bootstrap
- Time for the managed runtime to start before your code runs
- init code
- Module imports, SDK clients and config loads outside the handler
- VPC penalty
- One-off Hyperplane ENI attachment for a VPC-attached function
Frequently Asked Questions
How is Lambda Cold Start calculated?
cold start ≈ runtime bootstrap + 8 ms per MB of package + 110 ms if VPC-attached + your init code, then multiplied by about 0.25 when SnapStart restores a snapshot. A cold start is the sum of downloading and unpacking the artefact, booting the runtime and running everything outside your handler. Package download scales with artefact size, VPC attachment adds a fixed network setup cost, and heavy SDK or framework imports usually dominate everything else. The coefficients here are order-of-magnitude figures — read the real numbers from the initDuration field in your CloudWatch REPORT lines.
Why does Lambda Cold Start matter?
Cold starts land on real user requests at exactly the wrong moment — during a deployment or a traffic spike — so knowing which of the four contributors dominates tells you whether to shrink the package, lazy-load clients, or pay for provisioned concurrency.
What values do I need to enter?
This calculator takes 8 inputs: Runtime, Deployment package size, Initialization code outside the handler, Function is attached to a VPC, SnapStart or a pre-warmed snapshot is enabled, Warm invocation duration, Invocations per month, Share of invocations that cold start. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Is init duration billed?
For a standard on-demand invocation the initialization phase is not billed, which is why cold starts hurt latency more than cost. SnapStart restore time and provisioned-concurrency initialization are billed, and both change the arithmetic.
Does VPC attachment still cost ten seconds?
No. Before the Hyperplane rework, VPC-attached functions could take ten seconds or more to attach an ENI on a cold start. Shared ENIs cut that to roughly 100 ms, so VPC attachment is now a minor factor next to a bloated package or a slow framework boot.