Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot, at the crossover where Lambda stops being cheaper — 2026 pricing, invocation thresholds, and interruption math.

Frequently Asked Questions

Is Lambda always cheaper than Fargate since you only pay for what you use?

No — that's a common myth. Below roughly 15 million invocations per month for sub-second execution times, Lambda tends to win on cost, but above that threshold Fargate typically wins by 40-70%, since Lambda's per-unit rate never drops with volume the way Fargate's flat per-second rate effectively does per-request.

Are Lambda cold starts still the main reason teams migrate to Fargate in 2026?

No — cold starts are largely a solved problem now via Provisioned Concurrency and SnapStart (which cuts Java init to under 200ms). The real driver behind migrating off Lambda at scale is the per-unit cost curve crossing over Fargate's, not cold start latency.

Is raw EC2 Spot always cheaper than Fargate Spot for the same workload?

On paper, yes — Fargate's per-vCPU-hour and per-GB-hour rate carries an orchestration premium over the underlying EC2 rate. But that comparison ignores the operational cost of self-managing Auto Scaling groups, instance-type diversification, and interruption handling, which Fargate Spot absorbs for you.

How much can instance-type diversification reduce EC2 Spot interruption risk?

Spreading a workload across 6+ instance types and multiple Availability Zones dramatically reduces the effective interruption rate compared to running a single instance type in a single AZ — average interruption frequency across all regions and types has historically stayed under 5%, but a single-type, single-AZ setup can see much higher rates.

What's a practical trigger for reviewing whether a Lambda-based service should move to Fargate?

A standing cost alert rather than a one-time launch decision — if the Lambda-related bill for a function group clears roughly $1,000/month, migrating it to Fargate is very likely the highest-ROI infrastructure task available that quarter, since the crossover point is easy to drift past unnoticed.

Discussion0