Lambda Cost Calculator
Price an AWS Lambda function from memory, duration and invocations in GB-seconds, including the free tier and Arm savings.
Inputs
Graviton2 functions bill roughly 20% less per GB-second.
The first 512 MB is included; only the excess is billed.
1 M requests and 400,000 GB-seconds per month per account.
Estimated Monthly Cost
$2.47
Compute (GB-second) Cost
$1.67
Request Cost
$0.80
Ephemeral Storage Cost
$0.00
GB-seconds Consumed
500,000GB-s
Cost per Million Invocations
$0.49
Step by step
Values used
Invocations per month = 5,000,000 requests; Memory configured = 512 MB; Average billed duration = 200 ms; Processor architecture = x86_64 — standard rate; Ephemeral /tmp storage = 512 MB; Price per GB-second = 0.0000 USD; Price per million requests = 0.2000 USD; Price per GB-second of /tmp = 0.0000 USD; Apply the perpetual free tier = Yes
Lambda Cost
GB-seconds = (memory MB ÷ 1024) × (duration ms ÷ 1000) × invocations; cost = billable GB-seconds × GB-second price × architecture factor + billable requests ÷ 1 M × request price.
Free-tier deduction
billable GB-seconds = max(0, GB-seconds − 400,000); billable requests = max(0, invocations − 1,000,000).
Estimated Monthly Cost
= 2.47
Compute (GB-second) Cost
= 1.67
Request Cost
= 0.80
Ephemeral Storage Cost
= 0.00
GB-seconds Consumed
= 500,000 GB-s
Cost per Million Invocations
= 0.49
How it works
Lambda charges two separate meters: a flat fee per request and a compute fee for the memory you reserved multiplied by the milliseconds you ran. Because memory is reserved rather than measured, a function set to 1024 MB pays for 1 GB even if it touches 90 MB of heap. The defaults here are US East list prices — confirm the current per-GB-second and per-request rate on the AWS Lambda pricing page for your region before you commit to a budget. Compute normally dominates a Lambda bill, so the single most valuable thing you can know is your monthly GB-second total: it tells you whether to tune memory, tune duration, or stop worrying about the invocation count.
Formulas
Lambda Cost
GB-seconds = (memory MB ÷ 1024) × (duration ms ÷ 1000) × invocations; cost = billable GB-seconds × GB-second price × architecture factor + billable requests ÷ 1 M × request price.
- GB-seconds
- Memory-time product Lambda actually bills, at 1 ms granularity
- architecture factor
- 1.0 for x86_64, about 0.8 for arm64 Graviton2
- free tier
- 1 M requests and 400,000 GB-seconds deducted each month
Free-tier deduction
billable GB-seconds = max(0, GB-seconds − 400,000); billable requests = max(0, invocations − 1,000,000).
Frequently Asked Questions
How is Lambda Cost calculated?
GB-seconds = (memory MB ÷ 1024) × (duration ms ÷ 1000) × invocations; cost = billable GB-seconds × GB-second price × architecture factor + billable requests ÷ 1 M × request price. Lambda charges two separate meters: a flat fee per request and a compute fee for the memory you reserved multiplied by the milliseconds you ran. Because memory is reserved rather than measured, a function set to 1024 MB pays for 1 GB even if it touches 90 MB of heap. The defaults here are US East list prices — confirm the current per-GB-second and per-request rate on the AWS Lambda pricing page for your region before you commit to a budget.
Why does Lambda Cost matter?
Compute normally dominates a Lambda bill, so the single most valuable thing you can know is your monthly GB-second total: it tells you whether to tune memory, tune duration, or stop worrying about the invocation count.
What values do I need to enter?
This calculator takes 9 inputs: Invocations per month, Memory configured, Average billed duration, Processor architecture, Ephemeral /tmp storage, Price per GB-second, Price per million requests, Price per GB-second of /tmp, Apply the perpetual free tier. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Why is my bill higher than this estimate?
The usual extras are data transfer out, the API Gateway or ALB in front of the function, CloudWatch Logs ingestion for whatever the function prints, and provisioned concurrency sitting idle. Lambda compute is often less than half the true cost of a serverless request path.
Does the free tier still apply if I use provisioned concurrency?
The 400,000 GB-second and 1 M request free tier applies to on-demand invocations. Provisioned concurrency is billed on its own meter for every second the capacity is configured, whether or not a request arrives, and is not covered by the free tier.