AWS Lambda - How AWS Pricing Works

AWS Lambda

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume—there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service—all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability.

AWS Lambda pricing

With AWS Lambda, you pay only for what you use. You are charged based on the number of requests for your functions and the time it takes for your code to execute. Lambda registers a request each time it starts executing in response to an event notification or invoke call, including test invokes from the console. You are charged for the total number of requests across all your functions.

Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 1ms. The price depends on the amount of memory you allocate to your function.

AWS Lambda participates in Compute Savings Plans, a flexible pricing model that offers low prices on Amazon EC2, AWS Fargate, and AWS Lambda usage, in exchange for a commitment to a consistent amount of usage (measured in $/hour) for a 1 or 3 year term. With Compute Savings Plans, you can save up to 17% on AWS Lambda. Savings apply to Duration, Provisioned Concurrency, and Duration (Provisioned Concurrency).

Request pricing

  • Free Tier: 1 million requests per month, 400,000 GB-seconds of compute time per month

  • $0.20 per 1 million requests thereafter, or $0.0000002 per request

Duration pricing

  • 400,000 GB-seconds per month free, up to 3.2 million seconds of compute time

  • $0.00001667 for every GB-second used thereafter

Additional charges

You may incur additional charges if your Lambda function uses 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. Data transferred into 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 on Amazon EC2 On-Demand Pricing under Data Transfer.