Contents
Key takeaways How AWS Lambda pricing works What is the AWS Lambda pricing breakdown? Is AWS Lambda free? The free tier explained What AWS Lambda actually costs: worked examples How is AI reshaping AWS Lambda and its bill? What are the hidden AWS Lambda costs most teams miss? New in 2026: Lambda Managed Instances How do you optimize AWS Lambda costs? What Lambda pricing means for your AI budget How do you track and control Lambda and AI spend? Frequently Asked Questions about AWS Lambda Costs

Quick Answer

AWS Lambda pricing has two core charges: $0.20 per 1 million requests and a duration charge of $0.0000166667 per GB-second on x86 (about 20% less on Arm), after a free tier of 1 million requests and 400,000 GB-seconds every month. Lambda looks almost free at small scale, then grows fast once traffic, memory, or AI model calls climb.

For finance leaders, Lambda is the line item that behaves least like a budget: near-zero one month, a five-figure surprise the next, and AI is widening that gap. CloudZero’s State of AI Costs found only 51% of organizations can confidently evaluate their AI ROI, and serverless inference is one quiet reason why.

This guide breaks down every Lambda charge, runs the math on real workloads, and shows finance and engineering how to tie that spend back to AI ROI, the number that matters most.

This guide takes one lens throughout: the number that matters in AWS Lambda pricing is not cost per GB-second, it is cost per AI outcome.

A Lambda function is only cheap or expensive relative to the value it returns. The teams that win their next budget are not the ones who shaved a few cents off duration, they are the ones who can answer what Lambda costs per result, and whether that result is worth it.

Key takeaways

  • AWS Lambda cost rests on two pillars: requests ($0.20 per 1 million) and duration (priced in GB-seconds)
  • The free tier is generous and never expires: 1 million requests, 400,000 GB-seconds, and 100 GiB of response streaming per month
  • Arm (Graviton2) runs roughly 20% cheaper per GB-second than x86, often with equal or better performance
  • Memory is the real cost lever: it sets both price and CPU speed, so under-powering a function can cost more, not less
  • AI workloads change the math. A function billed for duration while it waits on a model call, plus higher memory and provisioned concurrency, is where serverless AI budgets quietly break
  • AI is not replacing serverless. It is shifting Lambda toward orchestration: calling models on Bedrock, OpenAI, SageMaker, or GPU-backed EC2, and handling the glue around them.

How AWS Lambda pricing works

AWS Lambda is an event-driven, serverless compute service: you upload code, and it runs only when triggered, scaling automatically. You are billed for what runs, not for idle servers. For a refresher on the model itself, see CloudZero’s primer on serverless computing and its guide to AWS Lambda.

The Lambda pricing model, or how AWS Lambda billing works at its core, has two core dimensions.

  • First, requests: every invocation counts as one request, whether it succeeds, fails, or retries, so your Lambda invocation cost is simply requests multiplied by the per-request rate.
  • Second, duration: how long your code runs, rounded to the nearest millisecond, multiplied by the memory you allocate.

The unit that ties it together is the GB-second, one gigabyte of memory held for one second. 

The formula is straightforward:

Total compute = memory (in GB) x duration (in seconds) x number of invocations x the GB-second rate. Add the request charge on top.

What is the AWS Lambda pricing breakdown?

Here are the core rates that make up the AWS Lambda price, as of 2026 for US East:

Chargex86 rateArm (Graviton2) rateFree tier (monthly)
Requests$0.20 per 1M ($0.0000002 each)Same1,000,000 requests
Duration$0.0000166667 per GB-second$0.0000133334 per GB-second400,000 GB-seconds
Response streamingbeyond 6 MB/requestSame100 GiB

The free tier is shared across both architectures and, unusually for AWS, never expires.

The duration line is what people mean when they search AWS Lambda pricing per GB-second: a GB-second is one gigabyte of memory held for one second, and it is where most of the bill lives.

CPU architecture is the easiest lever to pull. Functions on Arm-based Graviton2 deliver up to 34% better price performance than x86, with a per-GB-second rate about 20% lower. For most Python, Node.js, Go, and Java workloads, switching is a one-line configuration change.

Tiered duration pricing kicks in at very high scale. On x86, AWS bills the first 6 billion GB-seconds per month at the standard rate, the next 9 billion at a reduced rate, and usage beyond 15 billion at a further discount, with Arm following a similar pattern. Most teams never reach tier two, but enterprises processing billions of events monthly save meaningfully from the volume tiers alone.

Is AWS Lambda free? The free tier explained

Yes, there is a real and generous AWS Lambda free tier: 1 million requests, 400,000 GB-seconds of compute, and 100 GiB of response streaming every month, and it does not expire after 12 months like most AWS free tiers.

In practice that covers a lot. A function at 512 MB running 200 ms per call can serve roughly 4 million invocations a month before duration charges begin. Side projects and internal tools often stay free indefinitely.

The free tier disappears fast under production traffic at higher memory, though, and it does not apply at all to functions with provisioned concurrency enabled. That is the first place a “free” serverless bill stops being free.

What AWS Lambda actually costs: worked examples

Abstract per-request pricing does not mean much without real numbers, so here are two, both using AWS’s own math.

A small API backend

Three million requests a month, 120 ms average duration, 1536 MB of memory on x86. 

Compute works out to 540,000 GB-seconds; subtract the 400,000 free and you bill 140,000 GB-seconds at $0.0000166667, or $2.33. Requests are 2 million billable at $0.20 per million, or $0.40. Total: about $2.73 a month.

An AI inference function

Six million requests a month, 280 ms average duration, 4096 MB of memory on x86, with 2048 MB of ephemeral storage.

Compute is 6,720,000 GB-seconds; minus the free tier you bill 6,320,000 GB-seconds, which AWS calculates at $105.33, before requests and storage.

Notice the jump. The only thing that changed was bigger memory and longer runtime, the exact profile of an AI workload. To model your own Lambda function cost, plug your numbers into the GB-second formula above or an AWS Lambda pricing calculator (also searched as an AWS Lambda cost calculator). That brings us to the part older Lambda guides never covered.

How is AI reshaping AWS Lambda and its bill?

The most useful thing to understand about Lambda in 2026 is that AI is not replacing serverless. 

It is shifting serverless toward orchestration, workflow management, and AI-enabled event processing, rather than raw application logic. Lambda is increasingly the glue around the model, not the place the model runs.

You can see it in the architecture. The classic pattern was API Gateway to Lambda to a database. The AI-era pattern inserts the model in the middle: API Gateway to Lambda to Bedrock or OpenAI to a database. Lambda becomes the orchestration layer, calling a model hosted elsewhere and shaping the data around it.

Where AI keeps Lambda relevant. Almost every AI system still needs event-driven code around the model, and that is exactly what Lambda is good at: preprocessing documents before sending them to an LLM, validating user input, triggering workflows after an AI response, moving data between systems, and running lightweight inference for smaller models. You pay only when that code runs, which keeps the glue cheap.

Where AI outgrows Lambda. Large AI workloads tend to need GPUs, long-running processes, lots of memory, and persistent connections, none of which Lambda was designed for. Hosting a large frontier model directly in Lambda is the wrong move. Calling a model on Amazon Bedrock, OpenAI’s APIs, a self-hosted model on GPU-backed Amazon EC2, or Amazon SageMaker, from a Lambda function, is the right one. Knowing where Lambda stops being the right tool is itself a cost decision.

Now the part that hits the bill, because the cost drivers Lambda charges on, memory and duration, are exactly the two things AI inflates.

  • You pay while the function waits on the model. This is the big one. When a Lambda function calls Bedrock, OpenAI, or any LLM, the function stays alive and billed for duration the entire time the model is generating. A call that takes three seconds to return is three seconds of GB-seconds you are paying for, most of it spent waiting, not computing. Across millions of requests, that waiting dominates the bill. For the underlying token-cost mechanics, see CloudZero’s guide to inference cost.
  • AI needs more memory, which costs more per second. Loading a model, holding embeddings, or processing large payloads pushes functions toward the high end of Lambda’s 128 MB to 10,240 MB range. Since the GB-second rate scales with memory, a 4 GB AI function costs roughly eight times the per-second rate of a 512 MB one, as AWS’s own inference example above shows.

Does AWS Lambda have a GPU? No. AWS Lambda GPU support does not exist; Lambda runs on x86 or Arm CPUs only.  For heavy model inference that needs a GPU, use SageMaker, Bedrock, or GPU-backed EC2 and ECS, and reserve Lambda for orchestration: routing requests, calling the model, and post-processing the output.

Latency-sensitive AI endpoints invite provisioned concurrency, which is not free. Cold starts hurt user-facing AI features, so teams keep functions warm with provisioned concurrency. That removes the free tier and adds a standing charge (rate below). Right for strict latency targets; an unbudgeted standing charge everywhere else.

Streaming responses add a dimension. Returning LLM output token by token uses Lambda response streaming. The first 6 MB per request and 100 GiB per month are free, after which it is billable. Easy to overlook on a chat feature serving millions of responses.

The bigger picture: AI is strengthening AWS overall, not weakening it. The same systems that lean on Lambda for orchestration also pull in more storage, more databases, more networking, more observability, and more serverless integrations. Lambda stays relevant because every AI system needs glue code and event handling, and the total AI bill keeps climbing. How AI affects your Lambda spend comes down to how long the model makes your function wait and how much memory it needs — both measurable, and both manageable once you can see them.

What are the hidden AWS Lambda costs most teams miss?

The headline rates are only part of the bill. These adjacent charges turn a tidy estimate into a surprise.

  • Lambda provisioned concurrency pricing. Keeping functions warm bills on capacity at $0.0000041667 per GB-second on x86 (about 20% less on Arm), plus requests and a separate duration rate when the functions run, and the free tier does not apply. A modest always-on configuration can quietly cost over $100 a month before a single extra invocation.
  • Ephemeral storage. Every function gets 512 MB of temporary storage free. Beyond that, up to 10,240 MB, you pay $0.0000000309 per GB-second for the extra. Relevant for AI functions that cache models or data in /tmp.
  • Initialization and cold starts. Duration charges include the initialization code declared outside your handler, not just the handler itself. Heavy runtimes like Java and C# with large dependency trees pay more on every cold start.
  • The services Lambda pulls in. Lambda rarely runs alone, and the API Gateway costs around AWS Lambda are the ones finance teams miss most. API Gateway, CloudWatch Logs, data transfer, and especially NAT Gateway charges for functions in a VPC calling external APIs can quietly exceed the Lambda charge itself. None of these have Lambda’s free tier.
  • Lambda@Edge. Running code at CloudFront’s edge is priced separately: $0.60 per 1 million requests plus $0.00005001 per GB-second.

New in 2026: Lambda Managed Instances

AWS now offers Lambda Managed Instances, which run Lambda functions on fully managed EC2 instances in your VPC, combining the serverless developer experience with EC2’s cost efficiency for steady-state, high-volume workloads. You can choose current-generation EC2 instance types and use EC2 pricing options, including EC2 Instance Savings Plans.

Note that AWS adds a 15% compute management fee on the EC2 on-demand instance price — this applies even when you receive Savings Plan or Reserved Instance discounts.

The strategic read: for spiky, event-driven work, classic per-invocation Lambda still wins. For predictable, always-on workloads, including some production AI services, Managed Instances can be cheaper than paying duration on every call. It is a genuine new lever in the 2026 pricing toolkit.

How do you optimize AWS Lambda costs?

AWS Lambda cost optimization comes down to a handful of habits that control most of the bill, even as the Lambda charges stack up across requests, duration, and the services around your functions.

  • Switch to Graviton2. Arm functions cost about 20% less per GB-second and often run faster, so you save twice. For most runtimes it is a one-line change.
  • Right-size memory, do not just lower it. Because memory sets CPU speed, a function at 512 MB can finish faster and cost less than the same code starved at 128 MB. Test across memory settings and pick the cost-optimal point rather than the lowest.
  • Commit if your usage is steady. AWS Compute Savings Plans offer up to 17% off duration and provisioned concurrency for a one or three year commitment. Predictable AI inference traffic is a good candidate.
  • Trim the waiting and the waste. Shorten model calls and timeouts, cut package size to speed cold starts, reuse connections outside the handler, and turn off provisioned concurrency where latency does not require it. For the broader discipline, see CloudZero’s guide to cloud cost optimization.

What Lambda pricing means for your AI budget

For a finance team, the problem with Lambda is not the rates, it is the variance. A bill that swings with traffic and model usage is hard to forecast, and AI makes the swings bigger. Three moves turn that into something a CFO can plan around.

  • Forecast on unit cost, not totals. Translate Lambda spend into cost per request, per customer, or per AI feature. Once you know your cost per AI inference, you can predict the bill from growth assumptions instead of reacting to it after the fact.

CloudZero’s unit economics

  • Tie every function to AI ROI. The real question is not what a Lambda function costs, it is whether the AI workflow it powers earns more than it spends. With only 51% of organizations able to confidently evaluate their AI ROI, the ones that can are the ones that win the next budget. For the wider discipline, see CloudZero’s guide to AI cost management.
  • Make engineering decisions visible to finance. The choice between x86 and Arm, 512 MB and 4 GB, or on-demand and provisioned concurrency is a budget decision dressed up as a configuration setting. When finance and engineering read the same numbers, those tradeoffs get made on purpose instead of discovered on the invoice.

How do you track and control Lambda and AI spend?

The hard part of AWS Lambda cost is not the rates, it is visibility. Lambda spend hides inside aggregated compute and storage line items, and AI calls scatter cost across duration, provisioned concurrency, and the services around the function. By the time the invoice arrives, the spike is already paid for.

As Erik Peterson, CloudZero’s co-founder and CTO, puts it, AI spend today is “lots of bets, not a lot of clarity.” CloudZero, the AI ROI company, was built to fix that, connecting every dollar of cloud and AI spend to the team, product, feature, and customer behind it, so a runaway Lambda function or a chatty Bedrock call shows up in hours, not at month end.

Teams at Toyota, Duolingo, and Grammarly use it to run AI and cloud spend as a unit economics discipline.

CloudZero research found that AI is now the primary driver of falling cloud efficiency across organizations, and that unmanaged AI spend, exactly the kind a serverless inference function generates, is where margins quietly erode. Tracking Lambda as one line in your total AI bill, alongside model APIs and GPU compute, is how teams stay ahead of it.

Want to see where your Lambda and AI spend really goes? , take the self-guided product tour, or start with a free cloud cost assessment before your next bill lands.

Frequently Asked Questions about AWS Lambda Costs