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, for usage falling within the first pricing tier – for example, up to 6 billion GB-seconds / month in US East (Ohio).

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

Lambda on-demand duration pricing tiers are applied to aggregate monthly duration of your functions running on the same architecture (x86 or Arm, respectively), in the same region, within the account. If you’re using consolidated billing in AWS Organizations, pricing tiers are applied to the aggregate monthly duration of your functions running on the same architecture, in the same region, across the accounts in the organization.

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. You can configure ephemeral storage for functions running on both x86 and Arm architectures. 512 MB of ephemeral storage is available to each Lambda function at no additional cost. You only pay for the additional ephemeral storage you configure.

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

  • Example 1: Mobile application backend

    Let’s assume you are a mobile app developer building a food ordering app. Customers can use the app 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 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 building a food ordering app. Customers can use the app 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 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. Your charges would be calculated as follows:

    Monthly compute charges

    The monthly compute price is $0.0000166667 per GB-s and the free tier provides 400,000 GB-s.
    Total compute (seconds) = 3 million * 120ms = 360,000 seconds
    Total compute (GB-s) = 360,000 * 1536MB/1024 MB = 540,000 GB-s
    Total compute – Free tier compute = monthly billable compute GB- s
    540,000 GB-s – 400,000 free tier GB-s = 140,000 GB-s
    Monthly compute charges =
    140,000 * $0.0000166667 = $2.33

    Monthly request charges

    The monthly request price is $0.20 per one million requests and the free tier provides 1 million requests per month.
    Total requests – Free tier requests = monthly billable requests
    3 million requests – 1 million free tier requests = 2 million monthly billable requests
    Monthly request charges = 2M * $0.2/M = $0.40

    Total monthly charges

    Total charges = Compute charges + Request charges = $2.33 + $0.40 = $2.73 per month

  • Example 2: Enriching streaming telemetry with additional metadata

    Let’s say you are a logistics company with a fleet of vehicles in the field, each of which are enabled with sensors and 4G/5G connectivity to emit telemetry data into an Amazon Kinesis Data Stream. You want to use machine learning (ML) models you’ve developed to infer the health of the vehicle and predict when maintenance for particular components might be required.
    Let’s say you are a logistics company with a fleet of vehicles in the field, each of which are enabled with sensors and 4G/5G connectivity to emit telemetry data into an Amazon Kinesis Data Stream. You want to use machine learning (ML) models you’ve developed to infer the health of the vehicle and predict when maintenance for particular components might be required.

    Suppose you have 10,000 vehicles in the field, each of which is emitting telemetry once an hour in a staggered fashion with sufficient jitter. You intend to perform this inference on each payload to ensure vehicles are scheduled promptly for maintenance and ensure optimal health of your vehicle fleet.

    Assume the ML model is packaged along with the function and is 512 MB in size. For inference, you’veconfigured your function with 1 GB of memory, and function execution takes two seconds to complete on average on an x86 based processor.

    Monthly request charges:
    Per month, the vehicles will emit 10,000 * 24 * 31 = 7,440,000 messages which will be processed by the Lambda function.

    Monthly request charges → 7.44M * $0.20/million = $1.488 ~= $1.49

    Monthly compute charges:
    Per month, the functions will be executed once per message for two seconds.

    Monthly compute duration (seconds) → 7.44 million * 2 seconds = 14.88 million seconds
    Monthly compute (GB-s) → 14.88M seconds * 1024 MB/1024 MB = 14.88 GB-s
    Monthly compute charges → 14.88M GB-s * $0.0000166667 = $248.00

    Total monthly charges:
    Monthly total charges = Request charges + Compute charges = $1.49 + $248.00 = $249.49

  • Example 3: Performing ML on customer support tickets and interactions to improve customer experience

    Let’s assume you are a financial services company looking to better understand your top customer service issues. Your goal is to improve the customer experience and reduce customer churn. Your customers can chat live with your customer support staff via the mobile app you provide. You decide to deploy a natural language processing (NLP) model.
    Let’s assume you are a financial services company looking to better understand your top customer service issues. Your goal is to improve the customer experience and reduce customer churn. Your customers can chat live with your customer support staff 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 the customer service interactions via the mobile app in order to display relevant support content or route the customer to the appropriate customer service agent. The number of support inquiries your inference model processes varies widely throughout the week.

    Let’s assume your functions running the inference model receive six million requests per month. The average function execution duration is 280 ms. You configure your function with 4096 MB of memory on an x86 based processor.

    You also configure your function to use 2048 MB of ephemeral storage.

    Your charges would be calculated as follows:

    Monthly compute charges:
    The monthly compute price is $0.0000166667 per GB-s and the free tier provides 400,000 GB-s.
    Total compute (seconds) = 6M * 280ms = 1,680,000 seconds
    Total compute (GB-s) = 1,680,000 * 4096 MB/1024 MB = 6,720,000 GB-s
    Total compute – AWS Free Tier compute = Monthly billable compute GB- s
    6,720,000 GB-s – 400,000 free tier GB-s = 6,320,000 GB-s
    Monthly compute charges = 6,320,000 * $0.0000166667 = $105.33

    Monthly request charges:
    The monthly request price is $0.20 per one million requests and the free tier provides one million requests per month.
    Total requests – Free tier requests = monthly billable requests
    6 million requests – 1 million free tier requests = 5 million monthly billable requests
    Monthly request charges = 5 million * $0.2/million = $1

    Monthly ephemeral storage charges:
    The monthly ephemeral storage price is $0.0000000309 for every GB-second and Lambda provides 512 MB of storage at no additional cost.
    Total compute (seconds) = 6M * 280ms = 1,680,000 seconds
    Total billable ephemeral storage = 2048 MB – 512 MB = 1536 MB
    Total ephemeral storage (GB-s) = 1,680,000 * 1536 MB/1024 MB = 2,520,000 GB-s
    Monthly ephemeral storage charges = 2,520,000 * $0.0000000309 = $0.08

    Total monthly charges:
    Total charges = Compute charges + Request charges = $105.33 + $1 + $0.08 = $106.41 per month

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 Lambda functions with AWS Lambda Extensions, duration also includes the time it takes for code in the last running extension to finish executing during shutdown phase. 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

Get Pricing Assistance

Contact AWS specialists to get a personalized quote