AwsIntermediate

AWS Lambda Cold Starts in 2026: What Actually Works

DeveloperHat Team
10 min read

TL;DR

Cold starts still bite in 2026, but the fixes changed: SnapStart now covers Python, .NET and containers — and provisioned concurrency and Graviton do the rest.

A Lambda cold start is the delay before your handler runs: Lambda has to create a new execution environment, download your code, start the runtime, and run your initialization code. On a warm environment none of that happens — the request goes straight to your handler. The gap between those two paths is the whole problem, and it is the reason a function that answers in 80 ms most of the time occasionally takes three seconds.

The short version: shrink your init first, because it is free and it helps every invocation. If the function is user-facing and traffic is spiky, add SnapStart — it now covers Java, Python, and .NET, including container images. If traffic is steady and the latency budget is strict, pay for provisioned concurrency instead. And switch to Graviton (arm64) regardless, because it makes every invocation cheaper. What follows is the detail behind each of those sentences, with the prices and limits as they stand in November 2026.

A cold start is everything before Invoke Warm invocations skip straight to the handler — cold ones pay download plus init first. Request API call arrives New environment MicroVM spins up Init runtime + imports Invoke handler runs Warm: skip init handler runs at once Init Duration is the part you can shrink — CloudWatch reports it per invocation.

What a cold start actually is

When Lambda needs a new execution environment, three things happen before your handler runs. First, Lambda provisions a Firecracker MicroVM and downloads your deployment package. Second, it starts the runtime — the JVM, the Python interpreter, the .NET runtime. Third, it runs your initialization code: imports, SDK client construction, framework bootstrapping, anything declared outside the handler. That third step is usually the largest, and it is the only one you control directly. Our Lambda patterns guide covers how to structure handlers so the expensive work happens once per environment, not once per request.

CloudWatch reports the init phase as Init Duration on every cold invocation, so measure before you optimize: if Init Duration is 150 ms, no cold-start fix will move your p99 by seconds, and your problem is somewhere else. Cold starts hurt most on synchronous, user-facing paths — APIs behind API Gateway, login and checkout flows, anything where a human is waiting on the response. They barely matter for asynchronous work: an S3-triggered thumbnail job or an SQS consumer that processes a queue does not care whether one invocation in a hundred takes an extra second.

The options

There are four levers, and the order matters: the free ones first, the paid ones only where the latency budget demands them.

Four levers, in the order you should pull them Start free. Pay only for the latency you actually need. Shrink init lazy imports · trim deps SnapStart snapshot restore · sub-second Provisioned always warm · double-digit ms Graviton arm64 · 20% cheaper duration Free → cheap → always-on → cheaper everything Each lever attacks a different slice of the cold start — stack them in this order. SnapStart and provisioned concurrency cannot be combined on the same version — pick one.

Option 1: Shrink the init — free, do this first

Every millisecond you cut from initialization helps warm and cold invocations alike, and it costs nothing. Lazy-load heavy imports inside the handler path that needs them instead of at module scope. Trim dependencies you do not call — a framework you import "just in case" still pays its import cost on every cold start. Keep the deployment package small: fewer megabytes to download means a faster environment setup. And remember that memory is also CPU in Lambda, so raising memory shortens CPU-bound init and often shortens billed duration enough to pay for itself; Lambda Power Tuning can find the sweet spot empirically. This is the unglamorous option, and it is the one most teams skip — then pay for provisioned concurrency to cover an init that was mostly an unused SDK import.

Option 2: SnapStart — snapshots instead of init

SnapStart is the biggest change to this decision in years. When you publish a version with SnapStart enabled, Lambda initializes the function once, takes a snapshot of the initialized memory and disk state, and restores new execution environments from that snapshot instead of initializing them from scratch. AWS describes the result as reducing startup "from several seconds to as low as sub-second," and the SnapStart documentation is the authoritative reference for the mechanics.

The runtime picture changed substantially in 2026. SnapStart now supports Java 11 and later, Python 3.12 and later, and .NET 8 and later, across both ZIP and container-image deployments — container-image support arrived in September 2026. Node.js, Ruby, and OS-only runtimes are still not supported. Three limits decide whether it fits your function: SnapStart applies only to published versions, never $LATEST; it cannot be combined with provisioned concurrency on the same version; and it does not support EFS, S3 Files, or ephemeral storage above 512 MB.

Two correctness gotchas deserve attention before you enable it. Anything your init code generates that must be unique — IDs, secrets, entropy for randomness — will be identical in every environment restored from the same snapshot, so generate unique values after restore, not during init. And network connections established during init are not guaranteed to survive a restore; AWS SDK connections usually resume, but other clients should validate and re-establish. AWS also notes SnapStart "works best when used with function invocations at scale" — a function invoked a few times a day may not see the same benefit.

Pricing is where the runtime matters. For Java, SnapStart is free — you pay only the normal request and duration charges. For Python and .NET, AWS charges for snapshot caching (per GB-second, minimum 3 hours per version) and for each restore. The Lambda pricing page works an example: 7.44 million messages with 1% cold starts on a 1 GB function costs $14.43 a month in SnapStart charges ($4.03 cache, $10.40 restore). Delete old versions you no longer need, or the cache charges keep running.

# Enable SnapStart on a published version (never $LATEST).
aws lambda update-function-configuration \
  --function-name checkout-api \
  --snap-start ApplyOn=PublishedVersions

aws lambda publish-version --function-name checkout-api

Option 3: Provisioned concurrency — pay to never wait

Provisioned concurrency keeps a set number of execution environments initialized and ready, so requests skip the init phase entirely. AWS describes it as keeping functions ready to respond in double-digit milliseconds, and it is the only option here that makes that kind of guarantee. Configure it on a published version or an alias — never $LATEST — and Application Auto Scaling can schedule it: full concurrency during business hours, zero overnight. See the provisioned concurrency documentation for the configuration details.

The price is explicit and unforgiving. In us-east-1, provisioned concurrency costs $0.0000041667 per GB-second on x86 ($0.0000033334 on Arm), billed from the moment it is enabled until it is disabled — whether or not it serves traffic. One 1 GB environment held warm for a month costs $10.80 before it handles a single request; ten cost $108. Invocations on provisioned environments are billed separately at a reduced duration rate of $0.0000097222 per GB-second, plus the usual $0.20 per million requests. The arithmetic gives a break-even near 60% utilization: below that, on-demand is cheaper; above it, you are paying for warmth you actually use — and at sustained high utilization you should be comparing against Fargate instead. One honest caveat: Lambda still recycles provisioned environments in the background, so a cold start can still occur if an environment is reset. Provisioned concurrency makes cold starts rare, not impossible.

Option 4: Graviton — the switch that pays for the others

Lambda's arm64 option runs on AWS Graviton processors, and it is the rare optimization that is both faster and cheaper. Duration on Arm costs 20% less per GB-second than x86 ($0.0000133334 vs $0.0000166667), and AWS claims Graviton-powered Lambda functions deliver up to 34% better price-performance than their x86 counterparts. The same 20% reduction applies to provisioned concurrency rates, so it compounds with Option 3. It also shortens CPU-bound init, which trims the cold start itself rather than just the bill. Our Graviton3 guide walks through the migration in detail; the short version is that it is usually a one-line architecture change — but native dependencies must be rebuilt for arm64, and you should run your test suite on the new architecture before flipping production traffic. The Lambda architecture documentation covers the arm64 option and its requirements.

Head-to-head

OptionLatency after the fixCost modelBest forWatch out for
Shrink the initProportional to what you cutFreeEvery functionDiminishing returns past a point
SnapStartAs low as sub-second (AWS)Free on Java; cache + restore on Python/.NETSpiky, user-facing Java/Python/.NETNo Node.js/Ruby; uniqueness caveats; not with provisioned concurrency
Provisioned concurrencyDouble-digit ms (AWS)$10.80/mo per 1 GB env, idle or notSteady, user-facing, strict p99Breaks even near 60% utilization; envs still recycle
Graviton (arm64)Shorter CPU-bound init20% cheaper durationEverything, as a defaultNative deps must be rebuilt for arm64

Pick by latency budget and traffic shape The wrong fix is worse than none — it costs money and hides the real bottleneck. Is p99 latency user-facing? API, checkout, login — or async? Async or tolerant shrink init only User-facing, spiky SnapStart first User-facing, steady provisioned concurrency Switch to Graviton (arm64) either way — it cuts duration cost 20% on every invocation.

Recommendation

The default stack for a user-facing Lambda in 2026 is: shrink the init, switch to arm64, and then pick one paid lever based on traffic shape. Spiky traffic — a checkout API that idles overnight and bursts at lunch — gets SnapStart, because you pay per restore rather than per idle hour. Steady traffic with a hard p99 — a login service that must answer in under 200 ms all day — gets provisioned concurrency, scheduled by Application Auto Scaling to match the daily curve. If your function is Java, SnapStart is free, so there is little reason not to try it first and measure. If it is Node.js, SnapStart is not an option at all, which makes the shrink-init work and provisioned concurrency the only levers — another reason to keep Node init lean.

When NOT to use these fixes

Do not pay for warmth your workload does not need. Asynchronous and event-driven functions — SQS consumers, S3 triggers, scheduled jobs — should almost never get provisioned concurrency; a one-second delay on one invocation in a hundred is invisible, and $10.80 a month per GB buys nothing. Do not enable SnapStart on a function invoked a handful of times a day and expect miracles; AWS is explicit that it works best at scale. And do not reach for any of these before checking what the init is actually doing: if the first invocation is slow because it opens a VPC connection or waits on a database, SnapStart will not help — fix connection reuse or consider RDS Proxy instead. The most common cold-start mistake is paying to warm an environment whose init was dominated by a downstream call.

Measuring it

Optimization without measurement is guessing. This CloudWatch Logs Insights query gives you the p99 Init Duration per hour — alarm on that, not on averages:

fields @timestamp, @initDuration
| filter @type = "REPORT" and ispresent(@initDuration)
| stats avg(@initDuration), max(@initDuration), pct(@initDuration, 99) as p99 by bin(1h)

Pair it with X-Ray traces on the user-facing paths, so you can see whether the cold start or the downstream call owns the slow request. Re-run the query after each change: the init you shrank, the SnapStart you enabled, the architecture you switched. If the number does not move, the fix did not land — check that the change reached a published version, because SnapStart and provisioned concurrency both ignore $LATEST.

Prices and runtime support in this guide are as of November 2026, using us-east-1 list prices from the AWS Price List published November 11, 2026. Lambda pricing varies by region and changes without notice — check the Lambda pricing page before committing to a number in your own budget.

Why This Matters

Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

Trade-offs to Consider

Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

When NOT to Use This

Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

Decision Framework

Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

Share this articleShare on XShare on LinkedIn

Keep the decision frameworks coming

One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.