Lambda vs Containers
Per-request functions against always-on containers: a choice about traffic shape, latency tolerance and how much of the runtime you want to own.
Reviewed 2026-09-21 · next review 2027-03-21
Weigh it yourself
The weights below are a starting suggestion, not a recommendation. Move them to match what your situation actually rewards — the totals are arithmetic on your weights, computed in your browser.
What you pay when demand is intermittent, which is where the models diverge most.
0 = does not matter here · 1–5 = increasingly decisive
What you pay when demand is continuous and predictable.
0 = does not matter here · 1–5 = increasingly decisive
Whether cold starts are acceptable on the paths users wait for.
0 = does not matter here · 1–5 = increasingly decisive
Execution duration limits, memory ceilings, and unusual runtime needs.
0 = does not matter here · 1–5 = increasingly decisive
How much rework a move to another platform would require.
0 = does not matter here · 1–5 = increasingly decisive
- Containers85% of the weight you assigned
- Functions (AWS Lambda)60% of the weight you assigned
Using the suggested starting weights. This is your arithmetic, not a verdict from this site.
How each option rates
| Criterion | Functions (AWS Lambda) | Containers |
|---|---|---|
| Cost under spiky or low traffic | 5/5 Zero cost while idle makes intermittent and bursty workloads very cheap. | 2/5 You pay for capacity whether or not requests arrive, and scale-to-zero is rarely practical. |
| Cost under steady high traffic | 2/5 At sustained high volume the per-invocation model costs substantially more than reserved compute. | 5/5 Reserved or spot capacity at sustained volume is far cheaper per request. |
| Latency consistency | 3/5 Cold starts are manageable with provisioned concurrency, which reduces the cost advantage. | 5/5 Warm processes give consistent latency with no cold-start class of problem. |
| Runtime and resource freedom | 2/5 Execution duration and memory ceilings constrain long or heavy work. | 5/5 Any runtime, any duration, large memory, background threads — no platform ceiling. |
| Portability | 2/5 Handler signatures and event shapes are platform-specific. | 5/5 A container image runs anywhere that runs containers. |
When this comparison stops applying
- Traffic is spiky but latency-critical — provisioned concurrency erodes the cost advantage, and at that point containers often win outright.
- You already operate an orchestrator: the marginal cost of one more service on it is near zero, which changes the arithmetic entirely.
- The workload is genuinely event-driven glue rather than a service, where functions win regardless of the rest of the table.