AWS Lambda Pricing (2026): Free Tier, GB-Seconds & Examples
AWS Lambda pricing explained: requests, GB-seconds, the free tier, Arm vs x86 and volume tiers, with worked cost examples and a free Lambda cost calculator.
Nilesh Sharma· · Updated · 13 min read

On this page
AWS Lambda pricing comes down to two numbers: how many times your function runs, and how many GB-seconds it uses. That sounds simple, but GB-seconds are hard to picture. How much does a 200 ms function at 1 GB actually cost per month? When does the free tier run out? Is Arm worth switching to? And why does the bill for a public API come out higher than the Lambda pricing page suggests?
This guide answers those questions with the formulas and worked examples. I build web apps for founders and often have to estimate hosting before anything is live, so I built a free Serverless Cost Calculator that does this maths for Lambda and three other providers. Every example below uses the same formulas, and you can open each one in the calculator.
All prices are official AWS list prices for US East (N. Virginia), us-east-1, in US dollars, before tax, checked on November 27, 2026 on the AWS Lambda pricing page and AWS's official Price List API. Other regions cost a little more or less. Prices change, so check the pricing page before you rely on a number.
Quick answer: AWS Lambda costs $0.20 per million requests plus $0.0000166667 per GB-second of run time on x86, or $0.0000133334 per GB-second on Arm (20% less). The free tier covers 1 million requests and 400,000 GB-seconds every month. So a function with 1 million requests a month at 200 ms and 1 GB costs $0, and 10 million requests at the same settings cost about $28.47 on x86 or $23.13 on Arm. API Gateway, data transfer and logs are billed separately. To estimate your own function, open the Lambda cost calculator.
How AWS Lambda pricing works
AWS now offers Lambda in several modes. The standard one, which most people mean by "Lambda", is Event Functions: priced per request and per GB-second of duration. This guide and the calculator cover Event Functions. The newer modes are covered briefly at the end.
Requests
Every time your function starts running in response to an event or an invoke call, it counts as one request. The price is $0.20 per million requests on both x86 and Arm.
Duration in GB-seconds
Duration is measured from the moment your code starts running until it returns or stops, rounded up to the nearest millisecond, and multiplied by the memory you configured:
GB-seconds = requests × duration in seconds × memory in GB
So 1 million requests that each run for 200 ms at 1,024 MB use 1,000,000 × 0.2 × 1 = 200,000 GB-seconds.
Two details make this more expensive than it looks:
- You pay for waiting. Duration is wall-clock time. If your function waits 2 seconds for a database or an AI model, you pay for those 2 seconds at full memory.
- Initialization counts. AWS bills initialization code that runs outside your handler as part of duration, so heavy imports and slow startup add cost on every cold start.
Memory can be set anywhere from 128 MB to 10,240 MB in 1 MB steps, and CPU power scales with it. More memory costs more per millisecond, but it can make CPU-bound code finish faster. There is an example of that trade-off below.
| Item | x86 | Arm (Graviton) |
|---|---|---|
| Requests | $0.20 per 1M | $0.20 per 1M |
| Duration, first tier | $0.0000166667 per GB-s (first 6B GB-s/month) | $0.0000133334 per GB-s (first 7.5B GB-s/month) |
| Duration, second tier | $0.0000150000 per GB-s (next 9B) | $0.0000120001 per GB-s (next 11.25B) |
| Duration, third tier | $0.0000133334 per GB-s (over 15B) | $0.0000106667 per GB-s (over 18.75B) |
| Ephemeral storage above 512 MB | $0.0000000309 per GB-s | $0.0000000309 per GB-s |
| Free tier (shared) | 1M requests + 400,000 GB-s per month | Same allowance |
Price per millisecond by memory size
If you think in milliseconds rather than GB-seconds, this table converts the first-tier price for common memory sizes. It is simple arithmetic from the GB-second rate.
| Memory | x86 per 1 ms | Arm per 1 ms |
|---|---|---|
| 128 MB | $0.0000000021 | $0.0000000017 |
| 512 MB | $0.0000000083 | $0.0000000067 |
| 1,024 MB | $0.0000000167 | $0.0000000133 |
| 1,536 MB | $0.0000000250 | $0.0000000200 |
| 2,048 MB | $0.0000000333 | $0.0000000267 |
| 4,096 MB | $0.0000000667 | $0.0000000533 |
| 10,240 MB | $0.0000001667 | $0.0000001333 |
A more useful way to read it: one million requests at 100 ms and 1 GB cost about $1.87 on x86 without the free tier, $1.67 for duration and $0.20 for requests. That is roughly $0.0000019 per request.
The AWS Lambda free tier
The Lambda free tier includes 1 million requests and 400,000 GB-seconds of compute every month, shared across x86 and Arm. AWS deducts it from your monthly usage before billing.
What 400,000 GB-seconds covers depends on memory:
- At 128 MB, 3.2 million seconds of run time.
- At 512 MB, 800,000 seconds.
- At 1,024 MB, 400,000 seconds. For example, 1 million requests averaging 400 ms.
- At 2,048 MB, 200,000 seconds.
For many side projects, internal tools and low-traffic APIs, that means the Lambda compute bill is genuinely $0. The free tier does not cover other services your function uses, such as API Gateway, DynamoDB, S3, CloudWatch logs or data transfer.
Worked examples: what AWS Lambda costs per month
These are worked examples, not measurements from a real account. I computed them from the list prices above with the same formulas the calculator uses. Unless noted, each assumes x86 in us-east-1 with the free tier applied and no API Gateway.
| Workload | Billable requests | Billable GB-seconds | Monthly cost |
|---|---|---|---|
| 1. Small API: 1M requests, 200 ms, 1 GB | 0 | 0 | $0.00 |
| 2. Production API: 3M requests, 120 ms, 1.5 GB | 2M ($0.40) | 140,000 ($2.33) | $2.73 |
| 3. Busy API: 10M requests, 200 ms, 1 GB | 9M ($1.80) | 1.6M ($26.67) | $28.47 |
| 4. Same, on Arm | 9M ($1.80) | 1.6M ($21.33) | $23.13 |
| 5. Same, without the free tier | 10M ($2.00) | 2M ($33.33) | $35.33 |
| 6. AI endpoint: 500k requests, 8 s, 1 GB | 0 | 3.6M ($60.00) | $60.00 |
| 7. AWS's own example: 6M requests, 280 ms, 4 GB, 2 GB ephemeral storage | 5M ($1.00) | 6.32M ($105.33) + storage ($0.08) | $106.41 |
Open them in the calculator: 1, 2, 3, 4, 5, 6 and 7.
Example 2, step by step
Here is the full maths for 3 million requests a month at 120 ms and 1,536 MB:
- Requests: 3,000,000 − 1,000,000 free = 2,000,000 × $0.20 per million = $0.40
- Compute: 3,000,000 × 0.12 s × 1.5 GB = 540,000 GB-s
- Billable compute: 540,000 − 400,000 free = 140,000 GB-s × $0.0000166667 = $2.33
- Total: $2.73 a month
Example 7 matches AWS's own worked example
The AWS pricing page includes a worked example of 6 million requests at 280 ms with 4,096 MB of memory and 2,048 MB of ephemeral storage, and arrives at $106.41 a month. The calculator produces the same $106.41: $105.33 of compute, $1.00 of requests and $0.08 of ephemeral storage. It is a useful check that the formulas match AWS's.
The AI endpoint problem
Example 6 is where Lambda's model hurts. An endpoint that calls a language model might spend 8 seconds waiting for the response and only a fraction of a second computing. Lambda bills all 8 seconds at full memory, so 500,000 requests cost $60.00 even though the CPU was mostly idle.
Cloudflare Workers bills CPU time only, and in the calculator the same workload costs $6.40 there. Vercel bills memory for the waiting time but not CPU, for $27.41. My serverless pricing comparison explains the difference across all four providers. The model's own token bill comes on top of hosting, and the AI Token Calculator estimates that part.
Memory, speed and cost: the tuning trade-off
Because Lambda gives you more CPU as you add memory, doubling memory can halve the run time of CPU-bound code. When it does, the cost stays the same. When it does not, you pay double for nothing.
This table is a hypothetical illustration of that arithmetic, not a benchmark. It uses 5 million requests a month on x86 with the free tier.
| Memory | Duration | GB-seconds | Monthly cost |
|---|---|---|---|
| 1,024 MB | 400 ms | 2,000,000 | $27.47 |
| 2,048 MB, and the code gets twice as fast | 200 ms | 2,000,000 | $27.47 |
| 2,048 MB, but the code only gets a third faster | 300 ms | 3,000,000 | $44.13 |
Measure real durations at a few memory sizes before you choose one. AWS Lambda Power Tuning, an open-source tool, automates this. For code that mostly waits on the network, extra memory rarely makes it faster, so the lowest memory that runs reliably is usually cheapest.
Arm vs x86
Arm (Graviton) functions cost 20% less per GB-second at every tier and have the same request price. In example 4 that turns $28.47 into $23.13. Most Node.js and Python functions run on Arm with no code changes. The exceptions are functions that ship native binaries compiled only for x86, which need an Arm build first.
Switching is usually a one-line change in your deployment configuration. Test it in a staging environment, compare duration as well as price, and keep x86 for any function that runs slower on Arm.
Volume tiers
Duration gets cheaper at very high monthly volumes, per account and per region. On x86, the first 6 billion GB-seconds cost $0.0000166667 each, the next 9 billion cost $0.000015, and everything above 15 billion costs $0.0000133334.
To give a sense of scale: 6 billion GB-seconds a month is about the same as 2,300 functions with 1 GB of memory running nonstop all month. Most apps never reach the second tier. If yours does, for example 2 billion requests a month at 2 seconds and 2 GB, which is 8 billion GB-seconds, the calculator bills the first 6 billion at the first-tier rate ($100,000.20) and the remaining 1,999,600,000 at the second-tier rate ($29,994.00), plus $399.80 in requests, for about $130,394 a month. At that scale, AWS Savings Plans and negotiated pricing, which the calculator does not model, are worth looking at.
The costs Lambda pricing does not include
The Lambda line on your AWS bill is often not the biggest one. These are billed separately:
API Gateway. To make a Lambda function a public HTTP API, most setups put Amazon API Gateway in front of it. In us-east-1, AWS's price list shows an HTTP API at $1.00 per million requests for the first 300 million a month and a REST API at $3.50 per million for the first 333 million. For the 10-million-request API in example 3, an HTTP API adds $10.00, taking the total from $28.47 to about $38.47. A REST API would add $35.00, more than the function itself.
Data transfer. Data sent from AWS to the internet is charged per GB. For APIs that return small JSON responses, it is minor. For functions that serve files or images, it can be large.
Logs and monitoring. Lambda sends logs to CloudWatch, which charges for log ingestion and storage. Verbose logging at high volume adds up, so set a log retention period.
Other services. DynamoDB, S3, SQS, Secrets Manager and anything else your function calls are billed on their own pricing pages.
Provisioned Concurrency. If you keep functions warm to avoid cold starts, you pay for that concurrency for as long as it is configured, whether requests arrive or not.
Other Lambda modes: Web Functions, MicroVMs and Managed Instances
AWS's pricing page now lists more than one Lambda mode, and they are priced differently:
- Web Functions are priced per request and per active CPU time, plus memory, and one execution environment can serve several requests at once. In AWS's price list for us-east-1 on Arm, that is $0.30 per million requests, $0.0000276944 per vCPU-second and $0.0000036667 per GB-second. This model is closer to Vercel's Active CPU pricing than to classic Lambda.
- MicroVMs are priced per instance-second.
- Lambda Managed Instances run your functions on EC2 instances that Lambda manages. You pay EC2 prices plus a management fee, and EC2 discounts such as Savings Plans apply.
The calculator covers only Event Functions, the default. If you are evaluating the other modes, use the AWS Pricing Calculator and the official pricing page.
AWS Lambda vs the alternatives
For function compute alone, Lambda is often the cheapest option for small and medium APIs, mainly because of the permanent free tier and the absence of a platform fee. In my worked examples, it costs $2.73 for the 3-million-request production API, against $20 on Vercel Pro or Netlify Pro and $11.60 on Cloudflare Workers. It loses on long, I/O-heavy requests, where Cloudflare's CPU-only billing wins.
The price is not the whole story. Vercel and Netlify include Git deploys, preview environments and a CDN for the $20. With Lambda you set up API Gateway, permissions, deploys and monitoring yourself, or with a framework like SST or the Serverless Framework. Read Vercel Functions pricing for the other side of that trade-off, and the serverless pricing comparison for all four providers.
A useful break-even check: one function with 1 GB of memory that is busy 100% of the time costs about $43.20 a month on x86 (2,592,000 GB-seconds in a 30-day month). If your traffic would keep functions busy around the clock, compare that with the price of a container or virtual machine that can handle the same load.
How to estimate your Lambda bill
- Find your numbers. CloudWatch shows invocations and average duration for each function. Your function's configuration shows memory.
- Use your busiest month. Launches, campaigns and bots can multiply traffic for a few days.
- Run the calculator. The Serverless Cost Calculator shows the request and duration lines separately, with the free tier and volume tiers applied, and lets you switch between x86 and Arm.
- Add the extras. API Gateway, data transfer, logs and the databases your function uses.
- Set a budget alert. AWS Budgets can email you when spending passes a threshold. Set one before launch.
If you are budgeting a full website rather than one function, see how much a website costs and website maintenance cost. For a primer on how servers, storage and networking fit together, read what cloud infrastructure is, and if APIs are new to you, start with what an API is.
FAQ
How much does AWS Lambda cost?
In us-east-1, AWS Lambda costs $0.20 per million requests and $0.0000166667 per GB-second on x86, or $0.0000133334 per GB-second on Arm, checked November 27, 2026. The first 1 million requests and 400,000 GB-seconds each month are free.
Is AWS Lambda free?
Lambda includes a free tier of 1 million requests and 400,000 GB-seconds of compute every month. Many small APIs and side projects stay inside it and pay nothing for Lambda itself. Other services such as API Gateway, logs and data transfer are billed separately.
What is a GB-second in AWS Lambda?
A GB-second is one second of run time at 1 GB of memory. AWS multiplies each request's duration by the memory you configured, so a 500 ms request at 2 GB uses 1 GB-second.
How much does AWS Lambda cost per request?
The request fee is $0.20 per million, or $0.0000002 per request. Duration usually costs more. A 100 ms request at 1 GB adds about $0.0000017, so the total is roughly $0.0000019 per request on x86 before the free tier.
Is Arm cheaper than x86 on Lambda?
Yes. Arm (Graviton) costs about 20% less per GB-second at every volume tier, and the request price is the same. Most Node.js and Python functions run on Arm without changes.
Does Lambda charge for idle or waiting time?
Lambda Event Functions bill the full time from when your code starts until it finishes, including time spent waiting on network calls. They do not bill when no request is running, unless you pay for Provisioned Concurrency.
Is there an AWS Lambda cost calculator?
Yes. AWS has its own Pricing Calculator for full architectures, and my free Serverless Cost Calculator estimates Lambda Event Functions with the free tier, Arm and volume tiers, and compares the result with Vercel, Netlify and Cloudflare Workers in one view. It runs entirely in your browser.
Next steps
Put your own numbers into the Serverless Cost Calculator to see your Lambda bill next to Vercel, Netlify and Cloudflare Workers. If you are planning a web app and want its architecture and running costs worked out before you build, send me a short brief.
- #aws lambda pricing
- #aws lambda cost
- #aws lambda cost calculator
- #aws lambda free tier
- #serverless pricing
- #serverless cost
- #web hosting


