AWS API Gateway Cost Calculator
Estimate API Gateway-style cost with a simple model: request fees + response transfer. Compare baseline vs peak traffic with your effective pricing and response size.
Inputs
Requests (per month)
Avg 114.22 req/sec.
Avg RPS
Use a realistic baseline RPS.
Est 315,187,200 requests/month.
Request price ($ / 1M requests)
Avg response size (KB)
Use the typical compressed payload size over the wire.
Egress price ($ / GB)
Use your effective price for internet egress or the relevant transfer path.
Scenario presets
Results
Estimated monthly total
$1,436.24
Request fees
$1,050.00
Transfer
$386.24
Estimated transfer (GB/month)
4,292
Cost per 1M requests
$4.79
Transfer per request
15 KB
How to get your inputs
- Inputs: use billing exports, metrics, or logs to get real counts/GB where possible.
- Units: convert throughput (Mbps) or rates (RPS) into monthly units when needed.
- Scenarios: build a baseline and a high-usage scenario to avoid under-budgeting.
Result interpretation
- If transfer dominates, reduce response size or add CDN caching.
- If request fees dominate, focus on caching, batching, and avoiding noisy clients.
Common mistakes
- Using a single average and ignoring peak/incident scenarios.
- Double-counting or missing adjacent line items (transfer, logs, retries).
Scenario planning
| Scenario | Requests | Response size | Transfer path |
|---|---|---|---|
| Baseline | Expected | Average | Typical |
| Peak | High | Higher under load | Worst-case |
Validate after changes
- Compare your estimate to the first real bill and adjust assumptions.
- Track the primary driver metric (requests/GB/count) over time.
Next steps
Advertisement
Example scenario
- 300M requests/month at $3.50 per 1M requests with 15 KB avg response and $0.09/GB egress.
- Peak 220% scenario helps budget for launch windows and incident spikes.
Included
- Request fee estimate from requests/month and $ per 1M requests.
- Transfer estimate from requests/month and average response KB (then $/GB).
- Request volume estimator for baseline and peak traffic.
- Baseline vs peak scenario table for request spikes.
Not included
- Caching, WAF, custom domains, and other add-ons unless you model them separately.
- Upstream/downstream service costs (Lambda, databases, logs, etc).
How we calculate
- Request cost = (requests per month / 1,000,000) x $ per 1M requests.
- Transfer GB/month ~= requests per month x avg response KB / 1024 / 1024.
- Transfer cost = transfer GB/month x $ per GB.
- Total = request cost + transfer cost.
FAQ
Do I always pay egress for API Gateway responses?
Not always. Transfer pricing depends on where traffic goes (internet, VPC, regions) and your architecture. Use your effective transfer rate for the path that applies.
What should I use for average response size?
Use the typical compressed payload size over the wire. Large responses can make transfer dominate total cost.
How do I reduce API Gateway cost?
Reduce request volume (caching, batching), reduce response size, and use a CDN for large payloads when appropriate.
Related tools
Related guides
API Gateway vs ALB vs CloudFront cost: what to compare (requests, transfer, add-ons)
A practical cost comparison of API Gateway, Application Load Balancer (ALB), and CloudFront. Compare request pricing, data transfer, caching impact, WAF, logs, and the hidden line items that change the answer.
CloudFront cache hit rate: how it changes origin egress cost
Cache hit rate strongly influences origin requests and origin egress (cache fill). Learn a simple model, what breaks hit rate, and the practical levers to improve it safely.
CloudFront pricing: estimate bandwidth and request costs (without hardcoding prices)
A practical way to estimate CloudFront-style CDN costs using your own bandwidth ($/GB) and request-fee ($ per 10k/1M) assumptions, plus common pitfalls like tiered pricing and origin egress.
Lambda vs Fargate cost: a practical comparison (unit economics)
Compare Lambda vs Fargate cost with unit economics: cost per 1M requests (Lambda) versus average running tasks (Fargate), plus the non-compute line items that often dominate (logs, load balancers, transfer).
API Gateway cost optimization: reduce requests, bytes, and log spend
A practical playbook to reduce API Gateway spend: identify the dominant driver (requests, transfer, or logs), then apply high-leverage fixes with a validation checklist.
API Gateway pricing: what to model (requests + transfer)
A practical API Gateway pricing checklist: request charges, data transfer, and the add-ons that can show up on the bill.
Advertisement
Disclaimer
Educational use only. Not legal, financial, or professional advice. Results are estimates based on the inputs and assumptions shown on this page. Verify pricing and limits with your providers and documentation.
Last updated: 2026-01-28