Why does AWS API Gateway spend rise even when backend infrastructure stays the same?
For most teams, the answer isn’t compute. API Gateway pricing is driven by how APIs are used — request volume, retry behavior, traffic patterns, and growth over time — not by provisioned resources.
Because AWS reports these costs as aggregated usage totals, it’s often unclear which APIs, environments, or behaviors are responsible for increases.
This article breaks down AWS API Gateway pricing, the behaviors that drive cost, and practical ways to reduce spend without changing how your APIs work.
But first …
What Is AWS API Gateway?
AWS API Gateway is a fully managed service that acts as the front door for your APIs. It receives requests from clients, applies rules (security, throttling, routing), and forwards those requests to backend services such as AWS Lambda, HTTP services, or other AWS APIs.
Instead of exposing backend services directly, API Gateway provides a single, controlled entry point. This lets teams manage access, traffic, and monitoring in one place, without changing backend code.
How does Amazon API Gateway work?
At a high level, API Gateway sits between clients and backends. Every request flows through the same core stages.
A client (web app, mobile app, third-party applications) sends an HTTP or WebSocket request to an API Gateway endpoint. This endpoint is the public URL AWS provides for your API.
At this point, no backend has been contacted yet. API Gateway receives the request first.
Before forwarding the request, API Gateway applies any configured controls, such as authentication and authorization, request validation, or throttling and rate limits.
Requests that fail these checks are rejected before reaching your backend, protecting downstream services and reducing unnecessary load.
Each API route is mapped to an integration, which defines where the request goes next. Common integrations include Lambda, EC2, Kinesis, DynamoDB, HTTP endpoints (internal or external), and other AWS services.

API Gateway transforms the incoming request, if needed, and forwards it to the configured backend.
The backend service executes its logic and returns a response to the API Gateway. This could be a Lambda execution result, an HTTP response, or data from another AWS service.
API Gateway does not run business logic itself. Its role is traffic management and mediation, not computation.
The API Gateway receives the backend response, applies any response transformations or headers, logs the request, and returns the final response to the client.

API Gateway processes and returns backend responses through its response mapping stages. Credit: Digital Cloud
From the client’s perspective, API Gateway is the service they interact with, even though the actual work happens elsewhere.
What types of APIs does Amazon API Gateway support?
Amazon API Gateway mainly supports three types of APIs. These include:
- HTTP APIs are ideal for simple, low-latency HTTP workloads
- REST APIs offer a broader feature set for REST-style applications, including advanced request handling and API management capabilities
- WebSocket APIs support stateful, bidirectional communication
Note: While these API types serve different use cases, they also shape how traffic flows through API Gateway. This is critical because AWS API Gateway pricing is based on request volume and usage patterns, not just the number of APIs you create.
So, how much does AWS API Gateway cost?
AWS API Gateway Pricing Explained
AWS API Gateway pricing is a usage-based cost model where AWS charges for every request, message, or connection minute that reaches the gateway. There are no minimum fees or upfront commitments, but there is also no concept of idle capacity.
For HTTP and REST APIs, pricing is driven by request volume. For WebSocket APIs, costs accrue based on both message count and connection duration. Data transfer out and optional features such as caching and custom domains add incremental charges.
From a FinOps perspective, API Gateway costs are driven less by infrastructure size and more by traffic patterns, API design decisions, retry behavior, and usage growth over time.
Free Tier
For new AWS accounts, each month includes a free tier for API Gateway (valid for 12 months):
- 1 million REST API calls
- 1 million HTTP API calls
- 1 million WebSocket messages
- 750,000 WebSocket connection minutes. If you exceed these amounts in a month, you pay standard usage rates.
Primary Factors That Affect API Gateway Pricing
AWS API Gateway pricing depends on which API type you use and how much you use it. The key components include:
1. Number of API requests (HTTP and REST APIs)
For HTTP and REST APIs, the main pricing unit is API requests. Each request that reaches API Gateway is billable, whether it succeeds or fails.
HTTP API requests

REST API requests

2. WebSocket API pricing
WebSocket APIs use a dual pricing model based on messages and connection time:
- Messages: $1.00 per million messages (first 1B), with possible tiered discounts at very high volumes.
- Connection minutes: $0.25 per million connection minutes.
Every minute a WebSocket connection remains open incurs a billing charge, even if no messages are sent.
3. Data transfer out
API Gateway charges for data transferred out to the internet at standard AWS data transfer rates. Inbound transfer is mostly free. The charge depends on the size of the response payloads your API serves.
4. Other features
Caching (REST APIs only)
REST API caching is billed hourly based on cache size; costs vary by region and cache capacity. Because cache charges apply as long as caching is enabled, they represent a fixed hourly cost.

Custom domain names
Using custom domain names with API Gateway incurs an additional monthly charge per domain. While often small, this adds recurring spend independent of request volume.
API portal products
API Gateway developer portals have separate monthly charges for portal products and endpoints.
How API Gateway Billing Works
When calculating your API Gateway costs for a given month, AWS aggregates usage by API type and applies regional pricing, free tier credits, and volume tiers where applicable. The basic formula is:
(Total billable API requests, messages, or connection minutes X applicable per-unit rates)
+ data transfer out + optional feature charges (such as caching or custom domains)
This is similar to other AWS services, such as Lambda, where usage units correspond directly to billing entries.
Note: Unlike other AWS services such as EC2, Elastic Load Balancers (ELB), EBS, and RDS, API Gateway doesn’t charge for idle resources. It, however, charges for every request that reaches the gateway.
See more:
What Actually Drives AWS API Gateway Costs
Although AWS API Gateway pricing appears simple, real-world costs are driven by usage behavior rather than API count.
The most common cost drivers include:
- High request frequency from chatty APIs or inefficient client design
- Retries and failed requests, which are still billable
- WebSocket idle time, where open connections accrue connection-minute charges
- Large response payloads, which increase data transfer out
- Public exposure, leading to unexpected or automated traffic
Understanding these drivers is critical for controlling API Gateway spend as traffic scales.
How To Reduce AWS API Gateway Costs
AWS API Gateway costs are driven by usage behavior, not infrastructure size. Optimization is less about rightsizing resources and more about controlling request volume, traffic patterns, API design, and optional feature usage.
From a FinOps standpoint, effective API Gateway cost optimization focuses on preventing unnecessary requests, shaping traffic intelligently, and identifying unexpected usage early.
Read more: What Is Cloud Provisioning and 10 Tools To Drive Infrastructure Innovation.
Here are some practical tips to reduce API Gateway costs:
1. Choose the right API type for your workload
The single biggest pricing decision is API type.
- Use HTTP APIs when you need basic request routing, Lambda or HTTP integrations, and standard authorization. They are cheaper per request.
- Use REST APIs only when you need features like API keys, usage plans, request validation, or advanced transformations.
- Use WebSocket APIs only for real-time, bidirectional use cases. Persistent connections introduce connection-minute charges even when idle.
2. Clean up unused APIs and stages
API Gateway doesn’t charge for idle APIs, but old stages, forgotten integration, and deprecated environments can still receive traffic, logs, or test calls.
Regularly reviewing and retiring unused APIs and stages reduces accidental usage and helps ensure costs are predictable.
3. Reduce unnecessary requests before they reach the API Gateway
API Gateway charges for every request it processes, including failed and rejected ones. Practical ways to reduce request volume include:
- Validate input early on the client side
- Avoid aggressive retry logic without backoff
- Block malformed or unauthorized requests as early as possible
- Limit public exposure for internal APIs
4. Use throttling and rate limits to control traffic
API Gateway supports throttling at the API, stage, and route levels. Rate limits help protect backends from spikes, prevent runaway client behavior, and reduce costs caused by unexpected request surges.
This is important for public or partner-facing APIs, where traffic patterns are less predictable.
5. Evaluate caching carefully (REST APIs Only)
Caching can reduce backend compute costs, but it introduces a fixed hourly charge.
Caching works best when responses are highly repeatable, traffic patterns are predictable, and backend execution costs are high.
But caching is less effective for bursty or highly dynamic APIs, where the cache incurs overhead without delivering meaningful request reduction.
6. Minimize response payload size
Data transfer out is billed separately from request pricing. You can reduce transfer costs by:
- Returning only required fields
- Avoiding large default responses
- Compressing payloads where appropriate
- Using pagination for large datasets
For high-traffic APIs, small payload reductions can materially lower monthly spend.
7. Monitor unexpected AWS API Gateway usage
AWS API Gateway costs often spike unexpectedly. AWS provides metrics and billing reports. But these often reflect changes after costs have already accrued, making API Gateway spend harder to monitor.
Understand And Control AWS API Gateway Costs With CloudZero
AWS reports API Gateway costs as aggregated service totals. You can see what you spent, but not which APIs, environments, or traffic patterns caused costs to rise.
CloudZero ingests AWS API Gateway charges directly from the AWS Cost and Usage Report, including:
- API request charges
- WebSocket messages
- WebSocket connection minutes
- Data transfer out
Because this data matches AWS billing granularity, teams can track API Gateway cost changes in near real time rather than waiting for month-end summaries.
API Gateway tagging is often incomplete, especially when APIs and stages are created across multiple teams. CloudZero applies FinOps discipline by allocating API Gateway costs using tags, accounts, environments, and organizational cost structures—making spend attributable even when native tagging falls short.

Source: A Guide To AWS Cost Allocation Tags And When To Use Them
If API Gateway costs spike due to traffic surges, misconfigurations, or unexpected usage, CloudZero’s anomaly detection compares recent spend to historical baselines and flags abnormal behavior early. Teams can investigate and resolve issues before costs compound.

CloudZero’s cost anomaly alerts
Key Takeaways: AWS API Gateway Pricing In Practice
- API Gateway charges for every request that reaches the gateway
- Failed, rejected, and retried requests still increase costs
- WebSocket APIs introduce time-based charges, not just message fees
- Small design decisions can materially impact monthly spend
- Visibility into traffic behavior is essential for long-term cost control
API Gateway itself is rarely “too expensive.” Unmanaged usage is.
Leading companies such as Drift, Demandbase, Upstart, and Duolingo use CloudZero to control cloud spend at scale. Drift alone saved $2.4 million, while Demandbase reduced cloud costs by 36% justifying $175 million in financing. Upstart reduced $20 million cloud spend with CloudZero. Here’s your chance, too. Take a product tour and
to see CloudZero in action for yourself.


