AWS Lambda Pricing

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.

  1. 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.
  2. 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.
  3. Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 1 ms*.
  4. 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.
  5. 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

ArchitectureDurationRequests
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
AWS Lambda Pricing

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)
1280.00000000210.0000000017
5120.00000000830.0000000067
10240.00000001670.0000000133
15360.00000002500.0000000200
20480.00000003330.0000000267
30720.00000005000.0000000400
40960.00000006670.0000000533
51200.00000008330.0000000667
61440.00000010000.0000000800
71680.00000011670.0000000933
81920.00000013330.0000001067
92160.00000015000.0000001200
102400.00000016670.0000001333
AWS Lambda Memory Pricing

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 Ephemeral Storage Pricing

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.

ArchitectureProvisioned ConcurrencyDurationRequests
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 Provisioned Concurrency Pricing

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 requests1000000 Per day
Duration of each request (in ms)10000
Amount of memory allocated256 MB
Amount of ephemeral storage allocated512 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

AWS lambda pricing calculator