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.

  • x86 Price
  • Arm Price
  • x86 Price
  • Arm Price

All examples below are based on price in US East (N. Virginia).

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. When Provisioned Concurrency is enabled and executed for your function, you also pay for Requests and Duration based on the prices below. If your function exceeds the configured concurrency, you will be billed for excess function execution at the rate outlined in the AWS Lambda Pricing section above. You can enable Provisioned Concurrency for functions running on both the x86 and Arm architectures. To learn more about Provisioned Concurrency, read the documentation.

Provisioned Concurrency is calculated from the time you enable it on your function until it is disabled, rounded up to the nearest five minutes. The price depends on the amount of memory you allocate to your function and the amount of concurrency that you configure on it. 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.

** Duration charges apply to code that runs in the handler of a function as well as initialization code that is declared outside of the handler. For functions configured with Provisioned Concurrency, AWS Lambda periodically recycles the execution environments and re-runs your initialization code. For more details, see the Lambda Programming Model documentation.

The Lambda free tier does not apply to functions enabling Provisioned Concurrency. If you enable Provisioned Concurrency for your function and execute it, you will be charged for Requests and Duration based on the price below.

All examples below are based on price in US East (N. Virginia).

  • Example 1: Mobile application launch

    Let’s assume you are a mobile app developer and are building a food ordering mobile application. Customers can use the application to order food from a specific restaurant location, receive order status updates, and pick up the food when the order is ready. Because you expect high variation in your application demand, both by time of day and restaurant location, you build your mobile backend using serverless services, including AWS Lambda.
    Let’s assume you are a mobile app developer and are building a food ordering mobile application. Customers can use the application to order food from a specific restaurant location, receive order status updates, and pick up the food when the order is ready. Because you expect high variation in your application demand, both by time of day and restaurant location, you build your mobile backend using serverless services, including AWS Lambda.

    For simplicity, let’s assume your application processes three million requests per month. The
    average function execution duration is 120 ms. You have configured your function with 1536 MB of memory on an x86 based processor.

    You are launching the new version of your mobile app, which you have heavily marketed. You expect a spike in demand during launch day, from noon to 8 p.m. You want your mobile app to be responsive even while demand scales up and down quickly, so you enable Provisioned Concurrency on your Lambda functions. You set Provisioned Concurrency to 100.

    During these eight hours, your functions received 500,000 requests. The average function
    execution duration while Provisioned Concurrency is enabled is 100 ms. During the rest of the month, your application receives the additional 2.5 million requests, and your functions execute in response to them without Provisioned Concurrency enabled.

    Your charges would be calculated as follows:

    Provisioned Concurrency charges:
    The Provisioned Concurrency price is $0.0000041667 per GB-s
    Total period of time for which Provisioned Concurrency is enabled (seconds): 8 hours * 3,600 seconds = 28,800 seconds
    Total concurrency configured (GB): 100 * 1536MB/1024MB = 150 GB
    Total Provisioned Concurrency amount (GB-s): 150 GB * 28,800 seconds =4,320,000 GB-s
    Provisioned Concurrency charges: 4.32M GB-s * $0.0000041667 = $18

    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
    3,000,000 requests – 1M free tier requests = 2,000,000 Monthly billable requests
    Monthly request charges = 2 * $0.20 = $0.40

    Compute charges while Provisioned Concurrency is enabled:
    The compute price is $0.0000097222 per GB-s
    Total compute duration (seconds) = 500,000 * 100ms = 50,000 seconds
    Total compute (GB-s) = 50,000 seconds * 1536 MB / 1024 MB = 75,000 GB-s.
    Total compute charges = 75,000 GB-s * $0.0000097222 = $0.73

    Compute charges while Provisioned Concurrency is disabled:
    The monthly compute price is $0.0000166667 per GB-s and the free tier provides 400,000 GB-s.
    Total compute (seconds) = 2.5M * 120ms = 300,000 seconds
    Total compute (GB-s) = 300,000 * 1536 MB / 1024 MB = 450,000 GB-s
    Total compute – Free tier compute = Monthly billable compute GB- s
    450,000 GB-s – 400,000 free tier GB-s = 50,000 GB-s
    Monthly compute charges = 50,000 * $0.0000166667 = $0.83

    Total monthly charges:
    Total charges = Provisioned Concurrency charges + Request charges + Compute charges while Provisioned Concurrency is enabled + Compute charges while Provisioned Concurrency is disabled
    Total charges = $18 + $0.40 + $0.73 + $0.83 = $19.96

  • Example 2 : Routing customers to the most relevant support solution content during Cyber Monday

    Let’s assume you are a retailer running a large sale during Cyber Monday, an ecommerce holiday that takes place the Monday after Thanksgiving in the United States. Your customers can chat live with customer support via the mobile app you provide. You decide to deploy a natural language processing (NLP) model.
    Let’s assume you are a retailer running a large sale during Cyber Monday, an ecommerce holiday that takes place the Monday after Thanksgiving in the United States. Your customers can chat live with customer support via the mobile app you provide. You decide to deploy a natural language processing (NLP) model.

    In this case, you are using the popular Bidirectional Encoder Representations from Transformers (BERT) model in AWS Lambda. The model helps you parse, analyze, and understand customer service interactions via the mobile app in order to display relevant support content or route the customer to the appropriate customer service agent. You will receive significantly more customer support inquiries during this sale than usual, so you decide to enable Provisioned Concurrency on your Lambda functions so your application responds quickly even while experiencing traffic spikes.

    Let’s assume your functions receive two million requests during the 24 hours of the sale event, while Provisioned Concurrency is enabled. The average function execution duration is 280 ms. You configure your function with 4,096 MB of memory on an x86 based processor, and set Provisioned Concurrency at seven.

    Your charges would be calculated as follows:

    Provisioned Concurrency charges:
    The Provisioned Concurrency price is $0.0000041667 per GB-s.
    Total period of time for which Provisioned Concurrency is enabled (seconds) = 24 hours * 3,600 seconds = 86,400 seconds
    Total concurrency configured (GB): 7 * 4096 MB / 1024 MB = 28 GB
    Total Provisioned Concurrency amount (GB-s) = 28 GB * 86,400 seconds = 2,419,200 GB-s
    Provisioned Concurrency charges = 2,419,200 GB-s * $0.0000041667 = $10.08

    Compute charges while Provisioned Concurrency is enabled:
    The compute price is $0.0000097222 per GB-s.
    Total compute duration (seconds) = 2,000,000 * 280ms = 560,000 seconds
    Total compute (GB-s) = 560,000 seconds * 4096 MB / 1024 MB = 2,240,000 GB-s.
    Total compute charges = 2,240,000 GB-s * $0.0000097222 = $21.78

    Monthly request charges:
    The monthly request price is $0.20 per 1 million requests
    Monthly request charges = 2M * $0.2/M = $0.40

    Total monthly charges:
    Total charges = Provisioned Concurrency charges + Compute charges while Provisioned Concurrency is enabled + Request charges = $10.08 + $21.78 + $0.40 = $32.26

Data Transfer & Other Charges

Data Transfer
Data transferred “in” to and “out” of your AWS Lambda functions, from outside the region the function executed, will be charged at the Amazon EC2 data transfer rates as listed under "Data transfer".

Data transfer with AWS Lambda Functions is free in the same AWS Region between the following services: Amazon Simple Storage Service (S3), Amazon Glacier, Amazon DynamoDB, Amazon Simple Email Service (SES), Amazon Simple Queue Service (SQS), Amazon Kinesis, Amazon Elastic Container Registry (ECR), Amazon Simple Notification Service (SNS), Amazon Elastic File System (EFS), and Amazon SimpleDB.

The usage of Amazon Virtual Private Cloud (VPC) or VPC peering, with AWS Lambda functions will incur additional charges as explained on the Amazon Elastic Compute Cloud (EC2) on-demand pricing page. A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses

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.


Lambda@Edge Pricing

Lambda@Edge functions are metered at a granularity of 1ms

Lambda@Edge Pricing Examples

Additional pricing resources

AWS Pricing Calculator

Easily calculate your monthly costs with AWS

Economics Resource Center

Additional resources for switching to AWS