Lambda - How AWS Pricing Works

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.

Lambda pricing

With 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 launching 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 1 millisecond (ms). The price depends on the amount of memory you allocate to your function.

Lambda participates in Compute Savings Plans, a flexible pricing model that offers low prices on Amazon EC2, Fargate, and Lambda usage, in exchange for a commitment to a consistent amount of usage (measured in $/hour) for a one- or three-year term. With Compute Savings Plans, you can save up to 17 percent on Lambda. Savings apply to duration, provisioned concurrency, and duration (provisioned concurrency).

Request pricing

  • Free Tier: 1 million requests 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 in to and out of your Lambda functions from outside the Region the function executed in will be charged at the Amazon EC2 data transfer rates as listed on Amazon EC2 On-Demand Pricing under Data Transfer.