API Gateway pricing: what to model (requests + transfer)
Start with a calculator if you need a first-pass estimate, then use this guide to validate the assumptions and catch the billing traps.
Use this page when you need to decide what belongs inside the API Gateway bill model before you argue about optimization.
This guide is about bill boundaries: request charges, transfer-sensitive line items, API Gateway features, and the adjacent log, CDN, WAF, and downstream execution costs that should be tracked beside API Gateway rather than confused with it.
API Gateway pricing inputs
- Requests/month: from metrics, logs, or RPS conversion.
- Response size: average KB to estimate transfer costs.
- Effective rates: blend tiers and region pricing.
Where to get the inputs
- Requests: API logs, gateway metrics, or analytics. Use a representative week and model peak separately if traffic is bursty.
- Payload sizes: average response size from logs or tracing. Use compressed sizes if compression is enabled.
- Transfer boundary: which path is billed (internet egress vs internal vs cross-region).
If you only have RPS and average payload size, convert it to GB/month with response size transfer.
What to include in an estimate
- Requests/month and your effective $ per million requests
- Average response size and the effective egress $/GB for your traffic path
- Logging/metrics (if enabled) and downstream costs (Lambda, databases, queues)
- Add-ons you use (custom domains, WAF, caching, etc.)
Inside the API Gateway bill vs outside the API Gateway bill
- Inside the API Gateway bill: request charges, API type feature charges, caching if enabled inside API Gateway, and transfer-sensitive billing lines that are part of the API path you are modeling.
- Usually outside the API Gateway bill: CloudFront, WAF, access-log storage and query costs, Lambda execution, databases, queues, and other downstream workflow spend.
- Why that boundary matters: teams often blame API Gateway for the whole request path bill when the real multiplier sits in transfer shape, log verbosity, retries, or downstream execution.
A fast model
Use AWS API Gateway Cost Calculator for a quick request + transfer estimate. Then add any feature-specific line items you rely on.
When transfer dominates
- Large list endpoints, exports, file downloads, and “fat JSON” responses can dominate spend.
- Retry storms multiply both requests and transfer, even when success traffic is unchanged.
- CDN caching in front of the gateway can reduce origin requests and origin transfer for cacheable traffic.
Common pitfalls
- Underestimating transfer by using uncompressed payload sizes.
- Retry storms (client retries, SDK retries, timeouts) inflating requests.
- Large responses (lists, exports, file downloads) dominating total spend.
Related tools
API Gateway cost calculator Access log cost calculator API request cost (generic) Response size to transfer API Gateway vs ALB vs CloudFront
Related: API Gateway access logs cost.
Validation checklist
- Validate the primary driver with measured usage from a representative window.
- Confirm units (GB vs GiB) and request pricing units (per 10k vs per 1M).
- Re-check incident windows: retries/timeouts often multiply cost drivers.
When this is not the right page
- If your main problem is turning metrics, logs, RPS, automated traffic, and retries into a defendable requests-per-month model, go to Estimate API requests per month.
- If the request and transfer model is already believable and you now need production changes, go to API Gateway cost optimization.
- If the real question is whether access logs are the side bill that matters, go to API Gateway access logs cost instead of blending logging into the core API price estimate.
Related tools
Sources
- AWS pricing overview: aws.amazon.com/pricing
- Use official API Gateway pricing for your region and API type to set effective $/request and $/GB assumptions.