AWS Lambda vs Fargate cost calculator: the serverless vs containers break-even point
Price one workload on Lambda, Fargate, Cloud Run and a VM cluster, then see the request rate at which the cheapest option changes.
How to verify this
Open your browser's network tab and change an input: nothing is sent. The page computes with the formulas and the dated price table below. Some entries in that table could not be checked against an official page and are labelled. The same engine answers the API and the MCP tool, so you can reproduce any scenario from code.
At 1.3M requests/day, Fargate becomes cheaper than Cloud Run.
- Note:Fargate has no 0.5 vCPU / 0.5 GB task size; it was rounded up to 0.5 vCPU / 1 GB.
- Heads-up:Containers run at 12% of capacity because of the 2-container floor.
- Note:Some prices for VM cluster, m7i.xlarge (hourly_usd) could not be confirmed on an official vendor page and are assumptions or third-party values. Treat that part of the comparison as an estimate and check your own bill.
- Note:API gateway and load balancer charges are not included.
Monthly cost vs requests per second
- AWS Lambda
- AWS Fargate
- Google Cloud Run
- VM cluster
- Your traffic
- Break-even
| Platform | Monthly cost | Units | Per million requests | Container utilization | What is priced |
|---|---|---|---|---|---|
| AWS Fargate | $35.55 | 2 tasks | $0.686 | 12% | 2 × 0.5 vCPU / 1 GB tasks; vCPU-hours $29.15; Memory GB-hours $6.40 |
| Google Cloud Run | $41.94 | 2 instances | $0.809 | 12% | 0.5 vCPU / 0.5 GiB instances, 2 kept warm; Active vCPU-seconds $7.46; Active GiB-seconds $0.78; Requests $20.74; Minimum instances (idle rates) $12.96 |
| AWS Lambda | $62.21 | n/a (per request) | $1.2 | n/a | 512 MB on x86; Requests $10.37; Duration (GB-seconds) $51.84 |
| VM cluster * | $290.30 | 2 instances | $5.6 | 12% | 2 × m7i.xlarge, 6 containers each (2 needed); 2 × m7i.xlarge for 720 hours $290.30 |
* includes a price that could not be checked against an official page.
Monthly cost as one input changes
Calculating the range…
How it is calculated
Load and units
M = 2,592,000 s (a 30-day month) R = rps × M requests T = duration ÷ 1000 s m = memory_mb ÷ 1024 GB L = rps × T requests in flight (× peak_to_avg_ratio in static_peak mode)
Lambda
C_L = R ÷ 10^6 × r_req + R × T × m × r_gbs
Containers needed
n = max(min_containers, ceil(L ÷ (cc × u))) cc = concurrency per container, u = target utilization as a fraction utilization = (rps × T) ÷ (n × cc)
Fargate
C_F = n × 720 × (v′ × r_vcpu_hour + m′ × r_gb_hour) (v′, m′) = the cheapest valid Fargate vCPU and memory pair at or above (vCPU, m)
Cloud Run
C_R = (R × T ÷ cc) × (v × r_cpu_s + m × r_mem_s)
+ R ÷ 10^6 × r_req
+ min_containers × M × (v × r_idle_cpu_s + m × r_idle_mem_s)VM cluster
per instance = floor(0.85 × min(instance vCPU ÷ v, instance GiB ÷ m)) instances = max(2, ceil(n ÷ per instance)) C_V = instances × 720 × hourly rate
Break-even
Evaluate every platform at 120 log-spaced request rates from 0.1 to 10,000 per second (widened to include your rate). Break-even = the lowest rate above which the cheapest container platform (Fargate, VM cluster) stays cheaper than the cheapest serverless one (Lambda, Cloud Run) to the end of the range. If containers scale in steps and the lead changes more than once, the first crossing is shown as well.
Assumptions
- A month is 30 days (2,592,000 seconds, 720 hours) for every platform. Traffic is the monthly average; spikes only change container counts in static_peak mode.
- Containers are sized from requests in flight (Little's law) at the target utilization, with a minimum container count for availability. Utilization shown is average load divided by capacity.
- Lambda is priced at list request and GB-second rates in US East (N. Virginia). Higher-volume duration tiers, provisioned concurrency and the extra cost of memory-driven CPU are not modelled.
- Fargate is priced on Linux tasks in US East (N. Virginia). The vCPU and memory pair is rounded up to the cheapest valid combination in the dataset.
- Cloud Run is priced with request-based billing at Tier 1 (us-central1) rates: busy instance-seconds are requests × duration ÷ concurrency, and the minimum instances are billed at idle rates for the whole month on top. The free allowance, when on, is taken off the busy usage and the request count.
- The VM cluster stands in for Kubernetes nodes you run yourself: always-on instances at on-demand rates, 85% of each instance usable by containers, at least 2 instances. Control-plane fees, storage and networking are not included.
- Prices are list prices in USD with no savings plans, Spot, committed-use or negotiated discounts. API gateway, load balancer, data transfer, NAT and logging charges are excluded.
- The Arm option changes the Lambda and Fargate rates. Cloud Run has one rate, and the VM follows the instance you choose.
The data behind it
| Platform | Item | Price | Checked |
|---|---|---|---|
| AWS Lambda | Requests, per million | $0.20 | 2026-11-05 |
| AWS Lambda | Duration, x86, per GB-second | $0.0000166667 | 2026-11-05 |
| AWS Lambda | Duration, Arm, per GB-second | $0.0000133334 | 2026-11-05 |
| AWS Lambda | Free tier, per month | 1,000,000 requests, 400,000 GB-seconds | 2026-11-05 |
| AWS Lambda | Maximum memory | 10,240 MB | 2026-11-05 |
| AWS Fargate | vCPU, x86, per hour | $0.04048 | 2026-11-05 |
| AWS Fargate | Memory, x86, per GB-hour | $0.004445 | 2026-11-05 |
| AWS Fargate | vCPU, Arm, per hour | $0.03238 | 2026-11-05 |
| AWS Fargate | Memory, Arm, per GB-hour | $0.00356 | 2026-11-05 |
| AWS Fargate | Minimum billed time per Linux task | 60 seconds | 2026-11-05 |
| Google Cloud Run | Busy vCPU, per second | $0.000024 | 2026-11-05 |
| Google Cloud Run | Busy memory, per GiB-second | $0.0000025 | 2026-11-05 |
| Google Cloud Run | Requests, per million | $0.40 | 2026-11-05 |
| Google Cloud Run | Minimum instance idle vCPU, per second | $0.0000025 | 2026-11-05 |
| Google Cloud Run | Minimum instance idle memory, per GiB-second | $0.0000025 | 2026-11-05 |
| Google Cloud Run | Free tier, per month | 180,000 vCPU-seconds, 360,000 GiB-seconds, 2,000,000 requests | 2026-11-05 |
| vCPU | Memory (GB) |
|---|---|
| 0.25 | 0.5, 1, 2 |
| 0.5 | 1, 2, 3, 4 |
| 1 | 2, 3, 4, 5, 6, 7, 8 |
| 2 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
| 4 | 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 |
| 8 | 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60 |
| 16 | 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 |
| 32 | 60, 120, 244 |
| Instance | vCPU | Memory (GiB) | Architecture | Per hour | Checked |
|---|---|---|---|---|---|
| m7i.large * | 2 | 8 | x86 | $0.1008 | Not verified |
| m7i.xlarge * | 4 | 16 | x86 | $0.2016 | Not verified |
| m7i.2xlarge * | 8 | 32 | x86 | $0.4032 | Not verified |
| m7g.large * | 2 | 8 | Arm | $0.0816 | Not verified |
| m7g.xlarge * | 4 | 16 | Arm | $0.1632 | Not verified |
| m7g.2xlarge * | 8 | 32 | Arm | $0.3264 | Not verified |
| Constant | Value |
|---|---|
| Seconds per month (30 days) | 2,592,000 |
| Hours per month | 720 |
| Share of a VM that containers can use | 85% |
| Minimum VM instances | 2 |
| Break-even search range | 0.1 to 10,000 requests per second, 120 points |
| Topic | What catches people out |
|---|---|
| Lambda duration and concurrency | Lambda bills duration in 1 ms steps, but provisioned concurrency is billed on top of that and is not modelled. The free tier does not apply to functions that use it. |
| Fargate sizes and minimum time | Fargate only offers set vCPU and memory pairs (0.5 vCPU takes 1 to 4 GB, for example), so a request is rounded up. Linux tasks are billed per second with a one-minute minimum per task. |
| Cloud Run billing mode | Cloud Run can bill per request (CPU only while a request is being handled) or per instance (for the whole life of the instance). This calculator prices request-based billing. The pricing page also rounds billable time up to the nearest 100 ms, which the calculator does not, so very short requests are understated. |
| Always-on floors | A high-availability floor keeps containers running when traffic is low. The calculator warns when containers run under 20% of capacity because of it. |
| Gateway and load balancer | API gateway and load balancer charges are excluded and can exceed compute at high request rates. |
| Regions and discounts | AWS rates here are US East (N. Virginia) and Cloud Run rates are us-central1. Other regions cost more or less, and savings plans, Spot and committed-use discounts can change the order. |
| VM prices | The VM hourly prices come from a third-party index because the AWS price table is not available as text, so they are flagged unverified until checked against AWS. |
Last updated 2026-11-05 (dataset 2026-11, refreshed monthly). Entries marked unverified or modelled could not be checked against an official page.
- https://aws.amazon.com/lambda/pricing/
- https://aws.amazon.com/fargate/pricing/
- https://aws.amazon.com/blogs/aws-cloud-financial-management/a-finops-guide-to-comparing-containers-and-serverless-functions-for-compute/
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-tasks-services.html
- https://cloud.google.com/run/pricing
- https://aws.amazon.com/ec2/instance-types/m7i/
- https://aws.amazon.com/ec2/instance-types/m7g/
- https://www.doit.com/compute/spot/us-east-1/m7i.xlarge
Three ways to reduce this number
- Use arm64 where the dataset shows a lower rate: switch the architecture above and compare the Lambda and Fargate rows.
- Right-size memory. More memory often shortens duration enough to lower the Lambda bill, so sweep memory and test your function at a few sizes.
- Raise container concurrency so fewer, fuller containers carry the load, and keep the minimum container count no higher than your availability needs.
Use it from code
The same engine is available as a REST endpoint and as an MCP tool named calc_serverless_vs_containers_breakeven. Your scenario as an API call:
curl -X POST 'https://api.x12i.com/v1/calc/serverless-vs-containers-breakeven' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"input": {
"requests_per_second": 20,
"peak_to_avg_ratio": 3,
"avg_duration_ms": 120,
"memory_mb": 512,
"vcpu_per_task": 0.5,
"arch": "x86",
"concurrency_per_container": 10,
"target_utilization_pct": 60,
"min_containers": 2,
"scaling_mode": "follows_load",
"platforms": [
"lambda",
"fargate",
"cloud_run",
"vm_cluster"
],
"include_free_tier": false,
"vm_instance": "m7i.xlarge",
"current_platform": "none",
"migration_stage": "evaluating"
},
"options": {
"explain": false
}
}' Schema: GET /v1/calc/serverless-vs-containers-breakeven/schema
Frequently asked questions
At what traffic is Fargate cheaper than Lambda?
There is no single number. Lambda's bill grows in a straight line with traffic, while a container fleet is a flat floor (your minimum containers) that rises in whole steps, so the two lines cross where Lambda's monthly cost equals the container cost. Short, light requests push that crossing to higher traffic; long or memory-heavy requests pull it down. This calculator finds the crossing for your numbers and shows it in the headline and the chart.
Does Lambda get cheaper with more memory?
Lambda charges for memory multiplied by duration, so a bigger setting costs more per millisecond. It gets cheaper only when the extra memory, and the extra CPU that comes with it, shortens the run by more than it raises the rate. For example, doubling memory pays off if the duration falls by more than half. Measure your function at a few sizes and use the memory sweep here to see the effect on the bill.
What costs does this comparison leave out?
API gateway and load balancer charges, data transfer, NAT gateways, logs and monitoring, storage beyond the included amounts, Lambda provisioned concurrency, Kubernetes control-plane fees, taxes, and any savings plan, Spot or committed-use discount. It also leaves out the engineering time to run containers or to fit a workload into functions. Prices are list prices for one region per vendor.
Why does the break-even sometimes cross more than once?
Containers are added in whole steps, while Lambda's cost rises smoothly. When the two have similar cost per request, the stepped line can dip below and rise above the smooth one several times. The calculator then reports the first crossing and the rate above which containers stay cheaper, and flags the result as not stable.