With AWS Lambda, you pay only for what you use. You are charged based on the number of requests for your functions and the duration, the time it takes for your code to execute.
Lambda Pricing Details
per month
of compute time per month.
The Lambda free tier does not automatically expire at the end of your 12 month AWS Free Tier term, but is available to both existing and new AWS customers indefinitely.
First 1M requests per month are free.
First 400,000 GB-seconds per month, up to 3.2M seconds of compute time, are free.
The price depends on the amount of memory you allocate to your function.
The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month. The memory size you choose for your Lambda functions determines how long they can run in the free tier. The Lambda free tier does not automatically expire at the end of your 12 month AWS Free Tier term, but is available to both existing and new AWS customers indefinitely.
The table below shows the free tier seconds and the approximate price per 100ms associated for different memory sizes.
The price in the table below is based on rates in US East (N. Virginia)
| Memory (MB) | Free tier seconds per month | Price per 100ms ($) |
|---|---|---|
| 128 | 3,200,000 | 0.000000208 |
| 192 | 2,133,333 | 0.000000313 |
| 256 | 1,600,000 | 0.000000417 |
| 320 | 1,280,000 | 0.000000521 |
| 384 | 1,066,667 | 0.000000625 |
| 448 | 914,286 | 0.000000729 |
| 512 | 800,000 | 0.000000834 |
| 576 | 711,111 | 0.000000938 |
| 640 | 640,000 | 0.000001042 |
| 704 | 581,818 | 0.000001146 |
| 768 | 533,333 | 0.000001250 |
| 832 | 492,308 | 0.000001354 |
| 896 | 457,143 | 0.000001459 |
| 960 | 426,667 | 0.000001563 |
| 1024 | 400,000 | 0.000001667 |
| 1088 | 376,471 | 0.000001771 |
| 1152 | 355,556 | 0.000001875 |
| 1216 | 336,842 | 0.000001980 |
| 1280 | 320,000 | 0.000002084 |
| 1344 | 304,762 | 0.000002188 |
| 1408 | 290,909 | 0.000002292 |
| 1472 | 278,261 | 0.000002396 |
| 1536 | 266,667 | 0.000002501 |
| 1600 | 256,000 | 0.000002605 |
| 1664 | 246,154 | 0.000002709 |
| 1728 | 237,037 | 0.000002813 |
| 1792 | 228,571 | 0.000002917 |
| 1856 | 220,690 | 0.000003021 |
| 1920 | 213,333 | 0.000003126 |
| 1984 | 206,452 | 0.000003230 |
| 2048 | 200,000 | 0.000003334 |
| 2112 | 193,939 | 0.000003438 |
| 2176 | 188,235 | 0.000003542 |
| 2240 | 182,857 | 0.000003647 |
| 2304 | 177,778 | 0.000003751 |
| 2368 | 172,973 | 0.000003855 |
| 2432 | 168,421 | 0.000003959 |
| 2496 | 164,103 | 0.000004063 |
| 2560 | 160,000 | 0.000004168 |
| 2624 | 156,098 | 0.000004272 |
| 2688 | 152,381 | 0.000004376 |
| 2752 | 148,837 | 0.000004480 |
| 2816 | 145,455 | 0.000004584 |
| 2880 | 142,222 | 0.000004688 |
| 2944 | 139,130 | 0.000004793 |
| 3008 | 136,170 | 0.000004897 |
Additional Charges
You may incur additional charges if your Lambda function utilizes other AWS services or transfers data. For example, if your Lambda function reads and writes data to or from Amazon S3, you will be billed for the read/write requests and the data stored in Amazon S3.
For details on AWS service pricing, see the pricing section of the relevant AWS service detail pages. Links to pricing for some of the commonly used services are listed below.
Includes pricing for storage, requests, and data transfer
Includes pricing for data storage, throughput capacity, and data transfer
Data Transfer
Data transferred “in” to and “out” of your AWS Lambda functions from outside the region the function executed in will be charged at the EC2 data transfer rates as listed here under “Data transfer”.
Data transferred between Amazon S3, Amazon Glacier, Amazon DynamoDB, Amazon SES, Amazon SQS, Amazon Kinesis, Amazon ECR, Amazon SNS, or Amazon SimpleDB and AWS Lambda functions in the same AWS Region is free. The usage of VPC or VPC peering with AWS Lambda functions will incur additional charges as explained here.
All examples below are based on price in US East (N. Virginia).
-
Example 1
If you allocated 512MB of memory to your function, executed it 3 million times in one month, and it ran for 1 second each time, your charges would be calculated as follows:If you allocated 512MB of memory to your function, executed it 3 million times in one month, and it ran for 1 second each time, your charges would be calculated as follows:Monthly compute charges
The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s.
Total compute (seconds) = 3M * (1s) = 3,000,000 seconds
Total compute (GB-s) = 3,000,000 * 512MB/1024 = 1,500,000 GB-s
Total compute – Free tier compute = Monthly billable compute GB- s
1,500,000 GB-s – 400,000 free tier GB-s = 1,100,000 GB-s
Monthly compute charges = 1,100,000 * $0.00001667 = $18.34
Monthly request charges
The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month.
Total requests – Free tier requests = Monthly billable requests
3M requests – 1M free tier requests = 2M Monthly billable requests
Monthly request charges = 2M * $0.2/M = $0.40
Total monthly charges
Total charges = Compute charges + Request charges = $18.34 + $0.40 = $18.74 per month
-
Example 2
If you allocated 128MB of memory to your function, executed it 30 million times in one month, and it ran for 200ms each time, your charges would be calculated as follows:If you allocated 128MB of memory to your function, executed it 30 million times in one month, and it ran for 200ms each time, your charges would be calculated as follows:Monthly compute charges
The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s.
Total compute (seconds) = 30M * (0.2sec) = 6,000,000 seconds
Total compute (GB-s) = 6,000,000 * 128MB/1024 = 750,000 GB-s
Total Compute – Free tier compute = Monthly billable compute seconds
750,000 GB-s – 400,000 free tier GB-s = 350,000 GB-s
Monthly compute charges = 350,000 * $0.00001667 = $5.83
Monthly request charges
The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month.
Total requests – Free tier request = Monthly billable requests
30M requests – 1M free tier requests = 29M Monthly billable requests
Monthly request charges = 29M * $0.2/M = $5.80
Total compute charges
Total charges = Compute charges + Request charges = $5.83 + $5.80 = $11.63 per month
-
Example 3
This example shows how charges are calculated when you are running functions with different memory sizes. For the example, let’s assume you have three functions, each with different memory sizes as described below:This example shows how charges are calculated when you are running functions with different memory sizes. For the example, let’s assume you have three functions, each with different memory sizes as described below:Function 1
128MB of memory, executed 25M times in one month, runs for 200ms each time
Total compute (seconds) = 25M * (0.2sec) = 5M seconds
Function 2
448MB of memory, executed 5M times in one month, runs for 500ms each time
Total compute (seconds) = 5M * (0.5sec) = 2M seconds
Function 3
1024MB of memory, executed 2.5M times in one month, runs for 1 second each time
Total compute (seconds) = 2.5M * (1sec) = 2.5M seconds
If you ran these functions, your charges would be calculated as follows:
Monthly compute charges
AWS Lambda normalizes the total compute time to GB-s and then sums the total across all functions
Function 1 (GB-S) = 5M seconds * (128MB/1024) = 625,000 GB-s
Function 2 (GB-S) = 2.5M seconds * (448MB/1024) = 1,093,750 GB-s
Function 3 (GB-S) = 2.5M seconds * (1024MB/1024) = 2,500,000 GB-s
Total monthly compute usage (GB-S) = 4,218,750 GB-s
The monthly compute price is $0.00001667 per GB-s and the free tier provides 400,000 GB-s.
Monthly charged compute usage = Total monthly compute usage – Free tier usage
Monthly charged compute usage = 4,218,750 – 400,000 = 3,818,750 GB-s
Monthly compute charges = 3,818,750 * 0.00001667 = $63.66
Monthly request charges
The monthly request price is $0.20 per 1 million requests and the free tier provides 1M requests per month.
Total requests – Free tier requests = Monthly billable requests
(25M+5M+2.5M) requests – 1M free tier requests = 31.5M Monthly billable requests
Monthly request charges = 31.5M * $0.2/M = $6.30
Total Monthly Charges
Total charges = Compute charges + Request charges = $63.66 + $6.30 = $69.96 per month
Lambda@Edge Pricing Details
Lambda@Edge functions are metered at a granularity of 50ms
Lambda@Edge Pricing Examples
-
Example 1
If your Lambda@Edge function executed 10 million times in one month, and it ran for 50ms each time, your charges would be calculated as follows:If your Lambda@Edge function executed 10 million times in one month, and it ran for 50ms each time, your charges would be calculated as follows:Monthly compute charges
The monthly compute price is $0.00000625125 per 128MB-second
Total compute (seconds) = 10M * (0.05sec) = 500,000 secondsMonthly compute charges = 500,000 * $0.00000625125 = $3.13
Monthly request chargesThe monthly request price is $0.60 per 1 million requests.
Monthly request charges = 10M * $0.6/M = $6.00
Total monthly charges
Total charges = Compute charges + Request charges = $3.13 + $6.00 = $9.13 per month
Pricing Calculator
Additional Pricing Resources
Calculate your total cost of ownership (TCO)
Easily calculate your monthly costs with AWS
Additional resources for switching to AWS
Learn how to get started with AWS Lambda