Cloud cost guide
AWS Lambda Cost Calculator 2026: How Much Does Serverless Cost?
Lambda bills on two dimensions — requests and compute (GB-seconds). It is essentially free for low traffic and can balloon for high-volume or long-running workloads. Below are the 2026 prices, the free tier, and real-world cost estimates for eight common workloads.
The formula
monthly_cost =
(requests − 1,000,000) × $0.0000002 # request charge
+ (GB-seconds − 400,000) × $0.0000166667 # compute charge
where GB-seconds = (memory_GB) × (duration_seconds) × requestsPrices shown are for the us-east-1 region. Other regions are typically 2–15% higher. Negative billable amounts are clamped to zero (free tier absorbs them).
Cost for 8 common workloads
| Workload | Requests/mo | Memory | Avg ms | Monthly cost |
|---|---|---|---|---|
Low-traffic REST API A backend endpoint hit ~33k times/day | 1M / month | 256 MB | 50 | 0.000000 |
Medium-traffic API A popular mobile app backend | 10M / month | 512 MB | 100 | 0.000000 |
High-traffic API A consumer web product at scale | 100M / month | 512 MB | 100 | 0.000000 |
Cron job (hourly) Scheduled report or cleanup task | 720 / month | 1024 MB | 5,000 | 0.000000 |
Cron job (every 5 min) Health check or poller | 8,640 / month | 512 MB | 2,000 | 0.000000 |
Webhook receiver Stripe/GitHub webhook handler | 5M / month | 128 MB | 30 | 0.000000 |
Image resize on S3 trigger Triggered by S3 object uploads | 500k / month | 2048 MB | 1,500 | 0.000000 |
Heavy data pipeline ETL transform on large payloads | 200k / month | 3008 MB | 60,000 | 0.000000 |
All figures assume the free tier is consumed by this single workload and exclude API Gateway, CloudWatch Logs and data transfer, which often cost more than Lambda itself.
How to actually cut your Lambda bill
Right-size memory first
Cost scales with memory × duration, but more memory often reduces duration more than proportionally. Use AWS Compute Optimizer or AWS Lambda Power Tuning to find the sweet spot — many workloads are cheapest at 512 MB or 1 GB, not the 128 MB default.
Cut duration, not requests
Halving cold-start and processing time halves compute cost. Move DB initialization outside the handler, lazy-load heavy SDKs, and use provisioned concurrency only when latency truly justifies it.
Watch the surrounding services
API Gateway at $3.50/M requests and CloudWatch Logs at $0.50/GB dwarf Lambda for many APIs. Consider HTTP APIs ($1.00/M) or Lambda Function URLs (free) when you do not need the full REST API Gateway feature set.
Switch to Fargate at scale
Above ~30M–50M short requests per month, or any sustained-load workload, a container on Fargate or EC2 is usually cheaper. Lambda's edge is sporadic, unpredictable traffic — not steady throughput.
Frequently asked questions
How much does AWS Lambda cost per request?+
Lambda charges $0.20 per 1 million requests ($0.0000002 each), plus compute charged in GB-seconds: $16.6667 per 1M GB-seconds. A 256 MB function that runs for 100 ms costs about $0.0000004 in compute plus $0.0000002 for the request — roughly $0.0000007 total, before the free tier. The first 1M requests and 400,000 GB-seconds each month are free.
Is AWS Lambda really free?+
Lambda has a permanent free tier of 1 million requests and 400,000 GB-seconds per month, forever (not just for the first 12 months). For a 256 MB function averaging 100 ms, that covers about 16 million invocations per month. Most small APIs, cron jobs and hobby projects never exceed the free tier and pay $0.
When does Lambda get expensive?+
Lambda cost scales with requests × memory × duration. It becomes expensive at three inflection points: very high request volume (100M+/month), high memory (1.5 GB+) with long durations (seconds), and always-on workloads. If your function runs continuously or handles sustained traffic, a container on EC2, Fargate or a dedicated server is usually cheaper than Lambda. A common rule of thumb: above ~1M invocations/day with non-trivial compute, compare Lambda against Fargate.
Does Lambda charge for idle time?+
No. Lambda bills only for the time your code is actually executing, measured from invocation to return, rounded up to the nearest 1 ms. There is no idle charge — you do not pay for the function sitting unused. This is the core economic advantage of serverless versus an always-on server.
How is GB-second calculated?+
GB-seconds = (allocated memory in GB) × (execution duration in seconds) × (number of invocations). A 512 MB function that runs for 200 ms uses 0.5 × 0.2 = 0.1 GB-seconds per invocation. One million such invocations consume 100,000 GB-seconds, costing about $1.67 in compute plus $0.20 in request charges.
What other AWS costs show up on a Lambda bill?+
Lambda itself is often the smallest line item. The surrounding services usually cost more: API Gateway (~$3.50/million requests), CloudWatch Logs ($0.50/GB ingested), X-Ray tracing, S3 storage for assets, data transfer out ($0.09/GB), and any Step Functions orchestration. Budget for these — a free Lambda behind API Gateway is not a free API.
Pricing reflects AWS Lambda public on-demand rates for us-east-1 in early 2026. Reserved Compute Savings Plans can reduce compute charges by up to 17%. Always validate against the AWS Pricing Calculator for your region and exact traffic pattern.