Fargate vs Lambda for request-driven work
One bills per task-hour, the other per request. The break-even is how busy the code stays.
What each service sells in us-east-1
The meters behind both bills, at on-demand rates.
| Meter | Rate | Unit | Covers |
|---|---|---|---|
| Lambda duration, x86 | $16.67 | per million GB-seconds | the first volume tier; the next two are cheaper |
| Lambda duration, Graviton | $13.33 | per million GB-seconds | the first volume tier |
| Lambda requests | $0.20 | per million requests | every invocation, on either architecture |
| Fargate vCPU, x86 | $0.04048 | per vCPU-hour | the compute a task reserves while it runs |
| Fargate memory, x86 | $0.004445 | per GB-hour | the memory a task reserves while it runs |
| Fargate ephemeral storage | $0.000111 | per GB-hour | above the storage AWS includes with each task |
Lambda bills duration in 1 ms increments and rounds GB-seconds up. The duration rates above are the first of three volume tiers, so the largest bills pay less per GB-second than this.
Monthly cost at three traffic levels
100 ms per request at 512 MB, against the smallest practical Fargate task.
| Option | 1M requests | 10M requests | 100M requests |
|---|---|---|---|
| Lambda, x86512 MB at 100 ms | $1.03 | $10.33 | $103.33 |
| Lambda, Graviton512 MB at 100 ms | $0.87Lowest | $8.67Lowest | $86.67 |
| Fargate, x86 tasks0.25 vCPU / 0.5 GB, busy 60% of the time | $9.01 | $9.01 | $63.07Lowest |
The Fargate row counts the whole tasks needed to do the same work at the assumed duty cycle, so it moves in steps rather than smoothly. No free allowance, Savings Plan or provisioned concurrency is included.
Which one to pick
Each recommendation links to the page for that option.
What to watch for
Gaps and gotchas that the price table does not show.
The task side assumes it is busy 60% of the time
A task serving queued work sits idle between requests, and idle time is what a task is billed for. The 60% assumption is what the task counts rest on: keep a task genuinely busy and Fargate wins at lower volume; let it idle more and Lambda wins for longer.
At least one task runs
The million-request column still shows a whole task, because the service needs one running to answer those requests. That floor is why low-volume work belongs on functions.
Lambda's free allowance is not applied
A new account gets a monthly allowance of requests and GB-seconds that would cover the million-request column outright. These tables price what you pay above the allowance, because the allowance ends and the traffic does not.
A 15-minute ceiling and cold starts are the real catch
Lambda stops an invocation at 15 minutes, so anything longer is a task. Cold starts are what you buy back with provisioned concurrency, billed per GB-second just for keeping environments warm: $4.17 per million GB-seconds on x86 in us-east-1.
Savings Plans move both sides
Under the same Compute Savings Plan (3 yr, No Upfront) the task costs $4.96 a month, 45% below on-demand, and Lambda duration is discounted too. Neither is applied in the tables above.