What each service sells in us-east-1

The meters behind both bills, at on-demand rates.

MeterRateUnitCovers
Lambda duration, x86$16.67per million GB-secondsthe first volume tier; the next two are cheaper
Lambda duration, Graviton$13.33per million GB-secondsthe first volume tier
Lambda requests$0.20per million requestsevery invocation, on either architecture
Fargate vCPU, x86$0.04048per vCPU-hourthe compute a task reserves while it runs
Fargate memory, x86$0.004445per GB-hourthe memory a task reserves while it runs
Fargate ephemeral storage$0.000111per GB-hourabove 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.

Option1M requests10M requests100M 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.

Recommended:Lambda
When: Traffic arrives in bursts and is quiet in between
Why: Idle time is free, and the concurrency you need at the peak exists only while the peak lasts.
When: You have a steady baseline with spikes on top
Why: Tasks absorb the traffic that is always there at a lower per-hour rate, and functions take the overflow without provisioning for it all month.
Recommended:Fargate
When: A request runs longer than a few minutes, or holds a connection
Why: Lambda caps an invocation's runtime, while a task can hold a connection for as long as it runs.
Recommended:Lambda
When: The work is short, the volume is low and nobody wants a server
Why: At low volume the bill is only the request and duration charge, with no task paid for while it waits.

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.

Related comparisons