AWS Lambda Cost Calculator
Estimate your monthly AWS Lambda bill using requests, execution duration, memory, architecture, and optional ephemeral storage.
How this AWS Lambda calculator works
This tool estimates AWS Lambda pricing by combining three components: request cost, execution duration cost, and optional ephemeral storage cost. It is designed for quick planning when you are building serverless APIs, event-driven data jobs, webhooks, or internal automation.
If you are comparing serverless options, this calculator helps answer practical questions like: “What happens if my traffic doubles?” or “How much does a longer runtime impact monthly spend?”
Lambda pricing formula (simplified)
1) Request charges
Lambda charges per invocation. Standard pricing starts at $0.20 per 1 million requests in many regions. With Free Tier enabled, the first
1,000,000 requests are subtracted each month.
2) Compute (GB-seconds)
Compute cost depends on memory and runtime. First we convert each invocation into GB-seconds:
GB-seconds = Requests × (Duration ms / 1000) × (Memory MB / 1024)
Then we multiply by the regional price per GB-second. In many regions, x86 on-demand is around $0.0000166667 per GB-second, while Arm is
lower at around $0.0000133334. The calculator can apply the Free Tier deduction of 400,000 GB-seconds.
3) Ephemeral storage
Lambda includes 512 MB temporary storage at no extra cost. If your function is configured above 512 MB, the additional storage is billed by GB-second. This is relevant for workloads that create temporary files, media processing pipelines, and ETL transformations.
Example scenario
Suppose your API receives 5 million monthly requests, each running for 120 ms with 512 MB memory. With Free Tier enabled, your billable request volume and billable GB-seconds drop significantly, often resulting in a surprisingly low monthly Lambda cost.
- Increase memory and cost may rise, but runtime can drop (sometimes reducing total cost).
- Switching to Arm can improve price-performance for supported runtimes.
- Small duration improvements have huge impact at high request volume.
How to reduce your AWS Lambda cost
Right-size memory instead of guessing
Under-provisioning memory can make functions run longer, which increases GB-seconds. Benchmark several memory settings and measure total cost per request, not just runtime.
Cut cold start overhead where it matters
Keep package size small, remove unused dependencies, and initialize heavy clients efficiently. If latency-sensitive workloads require warm capacity, compare provisioned concurrency cost against business value.
Optimize architecture and runtime
Arm/Graviton often lowers cost. Newer runtimes may also execute faster and use fewer resources. Always run realistic load tests before migration.
Control log volume
Verbose logging can become a hidden cost driver. Move debug logs behind flags and retention policies to keep your CloudWatch bill predictable.
When this estimate may differ from your AWS bill
- Rounding behavior: Lambda bills execution duration in milliseconds, which can vary by invocation profile.
- Burst traffic patterns: Average runtime may hide p95/p99 behavior and retries.
- Service integrations: API Gateway, SQS, DynamoDB, and VPC networking each add cost outside this calculator.
- Regional variations: Prices differ by AWS region and can change over time.
FAQ
Does Lambda always stay cheaper than EC2 or containers?
Not always. Lambda is excellent for spiky, event-driven workloads and low operational overhead. For steady, high-throughput traffic, ECS/EKS/EC2 may become more economical depending on utilization and team operations.
What is the biggest cost lever?
Usually execution duration. Even small reductions in average milliseconds can meaningfully lower monthly cost at scale.
Should I include Free Tier in production estimates?
It depends. For long-term forecasting, model both with and without Free Tier so your plan is resilient as usage grows.
Final thoughts
A practical AWS Lambda calculator gives you fast cost visibility before shipping architecture decisions. Use this page to model different request volumes, memory settings, and runtimes, then validate with real CloudWatch metrics once deployed. Good serverless cost control is mostly about measurement, iteration, and disciplined performance testing.