Overview of AWS Lambda Pricing
AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.
Following are some of highlights of AWS Lambda Pricing.
- With Lambda, you can run code for virtually any type of application or backend service, all with zero administration, and only pay for what you use. You are charged based on the number of requests for your functions and the duration it takes for your code to execute.
- Lambda counts a request each time it starts executing in response to an event notification trigger, such as from Amazon Simple Notification Service (SNS) or Amazon EventBridge, or an invoke call, such as from Amazon API Gateway, or via the AWS SDK, including test invokes from the AWS Console.
- Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 1 ms*.
- The price depends on the amount of memory you allocate to your function. In the AWS Lambda resource model, you choose the amount of memory you want for your function, and are allocated proportional CPU power and other resources.
- You can run your Lambda functions on processors built on either x86 or Arm architectures. AWS Lambda functions running on Graviton2, using an Arm-based processor architecture designed by AWS, deliver up to 34% better price performance compared to functions running on x86 processors.
AWS Lambda Pricing
Architecture | Duration | Requests |
---|---|---|
x86 Price | $0.0000166667 for every GB-second | $0.20 per 1M requests |
Arm Price | $0.0000133334 for every GB-second | $0.20 per 1M requests |
Duration cost depends on the amount of memory you allocate to your function. You can allocate any amount of memory to your function between 128 MB and 10,240 MB, in 1 MB increments. The table below contains a few examples of the price per 1 ms associated with different memory sizes.
Memory (MB) | Price per 1ms (X86) | Price per 1ms (ARM) |
128 | 0.0000000021 | 0.0000000017 |
512 | 0.0000000083 | 0.0000000067 |
1024 | 0.0000000167 | 0.0000000133 |
1536 | 0.0000000250 | 0.0000000200 |
2048 | 0.0000000333 | 0.0000000267 |
3072 | 0.0000000500 | 0.0000000400 |
4096 | 0.0000000667 | 0.0000000533 |
5120 | 0.0000000833 | 0.0000000667 |
6144 | 0.0000001000 | 0.0000000800 |
7168 | 0.0000001167 | 0.0000000933 |
8192 | 0.0000001333 | 0.0000001067 |
9216 | 0.0000001500 | 0.0000001200 |
10240 | 0.0000001667 | 0.0000001333 |
Lambda Ephemeral Storage Pricing
Ephemeral storage cost depends on the amount of ephemeral storage you allocate to your function, and function execution duration, measured in milliseconds. You can allocate any additional amount of storage to your function between 512 MB and 10,240 MB, in 1 MB increments.
Ephemeral Storage | $0.0000000309 for every GB-second |
Lambda Provisioned Concurrency Pricing
Enable Provisioned Concurrency for your Lambda functions for greater control over your serverless application performance. When enabled, Provisioned Concurrency keeps functions initialized and hyper-ready to respond in double-digit milliseconds. You pay for the amount of concurrency you configure, and for the period of time you configure it.
Provisioned Concurrency is calculated from the time you enable it on your function until it is disabled, rounded up to the nearest five minutes.
Architecture | Provisioned Concurrency | Duration | Requests |
---|---|---|---|
x86 Price | $0.0000041667 for every GB-second | $0.0000097222 for every GB-second | $0.20 per 1M requests |
Arm Price | $0.0000033334 for every GB-second | $0.0000077778 for every GB-second | $0.20 per 1M requests |
AWS Lambda Free Tier
The AWS Lambda free tier includes one million free requests per month and 400,000 GB-seconds of compute time per month, usable for functions powered by both x86, and Graviton2 processors, in aggregate.
AWS lambda pricing calculator
Following is sample AWS Lambda Pricing Calculator for application with following assumptions
Number of requests | 1000000 Per day |
Duration of each request (in ms) | 10000 |
Amount of memory allocated | 256 MB |
Amount of ephemeral storage allocated | 512 MB |
Total monthly cost: Number of requests: 1000000 per day * (730 hours in a month / 24 hours in a day) = 30416666.67 per month Amount of memory allocated: 256 MB x 0.0009765625 GB in a MB = 0.25 GB Amount of ephemeral storage allocated: 512 MB x 0.0009765625 GB in a MB = 0.5 GB | 1,273.44 USD |