{{ result.summaryTitle }}
{{ formatCurrency(result.monthlyTotal) }}
{{ result.summaryLine }}
{{ badge.label }}
CLIENTS GATEWAY BACKEND {{ gatewayStageMarker }}
API Gateway cost inputs
Start with HTTP, REST cache, Private REST, WebSocket, or Custom assumptions.
Choose the API family that matches the AWS API Gateway endpoint you are budgeting.
Use US standard for default AWS examples, or adjust with a premium/custom profile.
{{ trafficHelp }}
{{ payloadHelp }}
KB
Estimate average response body sent to clients after compression.
KB
Choose response streaming only when the REST API streams large payloads through API Gateway.
Choose no cache, AWS public 1.6 GB example, or a custom hourly cache rate.
{{ cache_hit_percent }}%
Enter the share of REST requests served from the API Gateway cache.
Subtracts the common first 1M request/message allowance and WebSocket connection-minute allowance when applicable.
Enter 0 to remove the budget check from output.
$ / mo
Use 1 for exact rates, or add a planning premium when region pricing is not final.
x
{{ retry_overhead_percent }}%
Keep small for steady APIs; raise for flaky clients, webhook replays, or canary traffic.
Use the allowance from your account or set 0 when the API line item owns all response transfer.
GB
Editable USD per GB response egress; set 0 if transfer is modeled elsewhere.
$ / GB
Rates are USD per million billable HTTP API request units before region multiplier.
$ then $
USD per million: first 333M, next 667M, next 19B, then over 20B.
1st $
2nd $
3rd $
4th $
Editable USD per million message units: first 1B, then over 1B.
1B $ over $
Editable USD per million connection minutes.
$ / 1M min
Rate and hours are editable for other cache sizes or partial-month tests.
$ / hr
Partial-month cache tests often explain cost spikes without changing request volume.
hours
Counts endpoint hourly charges across AZs for a steady month.
AZs
Hourly rate per AZ and data processing rate per GB through the endpoint.
$ / hr $
Leave at 0 unless you are budgeting API Gateway developer portal line items.
portals @ $
Enter extra PortalProducts beyond the included portal allowance when they are billable.
products @ $
{{ header }} Copy
{{ cell }}
{{ header }} Copy
{{ cell }}
{{ header }} Copy
{{ cell }}
Customize
Advanced
:

Introduction:

API Gateway cost is driven by metered traffic, API family, payload size, optional add-ons, and the services around the gateway. A low request count can still create a noticeable bill when payloads cross metering chunks, response transfer is large, REST caching runs all month, PrivateLink endpoints are provisioned across Availability Zones, or WebSocket connections stay open for long periods.

The main AWS API Gateway families do not share one price shape. HTTP APIs are request-unit oriented and meter larger requests in 512 KB chunks. REST APIs use call tiers, with a separate response-streaming path when large streamed responses are enabled. Private REST APIs remove internet data-transfer-out charges from the gateway line but can add interface endpoint hours and data processing. WebSocket APIs meter message units and connection minutes.

Client requests passing through an API gateway meter, optional cache, and backend.

For planning, request volume alone is not enough. Retries, webhook replays, canary probes, and load-test spillover can increase billable traffic. Payload size can multiply the primary meter for HTTP APIs and WebSocket messages. Response size can turn data transfer into a meaningful cost for public HTTP and REST APIs. REST cache economics also need care because gateway request charges still apply to client calls even when a cache hit reduces backend work.

A useful estimate shows both the monthly total and the meter path behind it. That makes it easier to compare API families, explain a budget variance, and decide whether to reduce payloads, switch API type, adjust cache assumptions, or move a cost into a separate Lambda, CloudWatch, WAF, VPC, or backend budget.

How to Use This Tool:

  1. Choose a Workload preset or start from Custom. Presets load editable assumptions for HTTP, REST cache, Private REST, and WebSocket cases.
  2. Select API type and Region price profile. Use a custom region multiplier only when you are applying a planning premium or entering exact rates in Advanced.
  3. Enter monthly traffic with the unit selector. For WebSocket APIs this is message count; for other API types this is client request count.
  4. Enter average request or message size. For non-WebSocket APIs, also enter average response size so transfer and Private REST endpoint data can be estimated.
  5. For REST APIs, choose whether response streaming is enabled and whether a REST API cache should be modeled. If cache is enabled, enter a hit rate that reflects real repeated traffic.
  6. Set Apply AWS free tier allowance only when it applies to the account and period you are estimating. Add a Monthly budget cap if you want the review table to surface over-budget or under-budget status.
  7. Open Advanced for retry overhead, data-transfer allowance and rate, request tiers, WebSocket connection-minute rates, cache hours, Private REST endpoint rates, and developer portal add-ons.

Interpreting Results:

The summary monthly total is a gateway-facing estimate. It includes the request or message meter, modeled response transfer, REST cache, WebSocket connection minutes, Private REST endpoint add-ons, and developer portal entries when those assumptions are active.

Metering Ledger is the best place to check why a bill grew. Look for retry-adjusted traffic, payload chunk factors, free-tier offsets, paid units, response transfer, Private REST endpoint data, WebSocket connection minutes, or cache backend avoidance.

Optimization Review turns the same math into budget and architecture cues. A cheaper API family in the ladder is not automatically a safe replacement; HTTP, REST, Private REST, and WebSocket APIs differ in features, routing, auth patterns, private connectivity, request transformation, and connection behavior.

Do not treat a within-budget result as a full application cost. Lambda, backend compute, CloudWatch, WAF, custom domains, data stores, NAT, VPC links, and support charges can exceed the gateway line item.

Technical Details:

The calculation normalizes traffic into billable units, subtracts eligible allowances, applies the selected tier or add-on rate, then sums the active components. The important distinction is between raw client activity and billable units. A single client request can become multiple units when payload metering applies.

Formula Core:

Nraw = x×Utraffic Nretry = Nraw×(1+r100) k = max(1,ceil(SpayloadSchunk)) Npaid = max(0,Nretry×k-Nallowance) Cmonth = Crequest+Ctransfer+Ccache+Cendpoint+Cconnection+Cportal

x is the entered traffic value, Utraffic is the selected unit multiplier, r is retry overhead percent, k is the payload or streaming chunk factor, and Nallowance is the enabled allowance. REST standard calls use a chunk factor of 1; HTTP APIs use 512 KB request chunks; WebSocket messages use 32 KB chunks; REST response streaming uses 10 MB response increments.

API Gateway cost components
Component When it applies How it is modeled
HTTP API requests HTTP API type Paid request units after 512 KB chunking and allowance, priced through first-300M and over-300M tiers.
REST API requests REST and Private REST Paid calls or response-streaming increments across the editable four-tier REST rate schedule.
WebSocket WebSocket API type Message units plus connection minutes from average active connections, connected hours per day, and a 30-day month.
Response transfer Public HTTP and REST Retry-adjusted traffic times average response size, minus included transfer, then multiplied by the per-GB rate.
Private endpoint Private REST Interface endpoint hours by Availability Zone plus request-and-response payload data processing.
REST cache REST cache profile enabled Hourly cache rate times billed hours; avoided backend requests are shown for break-even context.

Worked substitution: 25 million HTTP API requests with 2% retry overhead become 25.5 million traffic events. At 4 KB average request size, the chunk factor is 1. If a 1 million allowance is applied, request charges use 24.5 million paid units before transfer is added.

The comparison ladder reuses the current traffic assumptions against each API family. That is useful for cost pressure, but it is not a migration recommendation by itself because each API family supports a different feature set.

Accuracy Notes:

AWS pricing changes by region, date, account terms, and service combination. This estimate is for planning and variance review, not an invoice parser.

  • Verify current regional rates on AWS before using the result for purchasing or finance approval.
  • Keep gateway-only scope clear. Backend compute, logging, WAF, custom domains, and data stores are outside the calculated monthly total.
  • Use billing export data when available because retries, probes, malformed clients, and payload distributions can differ from averages.
  • Do not apply the free-tier allowance when the account, service, or time period is not eligible.

Worked Examples:

HTTP launch traffic. A new HTTP API with 25 million monthly requests, small request payloads, and modest response size should be dominated by request-unit and response-transfer lines. The Metering Ledger confirms whether payload chunking stayed at 1x.

REST cache test. A REST API with 100 million monthly requests and a 45% cache hit model still pays gateway request charges. The cache line should be judged against the Backend requests avoided by cache row, not against request charges disappearing.

WebSocket collaboration workload. A WebSocket workload with 60 million messages, 10,000 average active connections, and 0.5 connected hours per day adds connection minutes to message-unit cost. If the monthly total is over budget, check both message size and connected-hours assumptions.

FAQ:

Why can one request count as more than one unit?

HTTP API requests above 512 KB and WebSocket messages above 32 KB are metered in chunks. REST response streaming can also multiply billable increments for large streamed responses.

Does REST cache remove API Gateway request cost?

No. The cache model adds hourly cache cost and estimates backend requests avoided, but client calls through API Gateway still count toward gateway request charges.

Why does Private REST show endpoint cost?

Private REST APIs can rely on interface endpoints. The calculator models endpoint hours across Availability Zones plus data processing when Private REST API is selected.

Can I use the API Type Ladder to choose an API family?

Use it as a cost comparison only. Feature needs such as WebSocket sessions, private connectivity, request transformation, usage plans, and auth patterns can make a higher-cost family necessary.

Glossary:

Request unit
A billable API Gateway request quantity after chunking and allowances are applied.
Response streaming
A REST API mode where large streamed responses can be metered in response-size increments.
Connection minute
A WebSocket billing measure based on active connections over time.
PrivateLink
A private connectivity service that can add endpoint hourly and data-processing costs for Private REST APIs.
Effective cost per million
The modeled monthly total divided by metered units, expressed per million units.

References: