AWS API Gateway Pricing: REST vs HTTP vs WebSocket Cost Breakdown

9 min read

Amnic

Amnic

AWS

Comparisons

Table of Contents

Table of Contents

No headings found on page

AWS API Gateway charges per million API calls, per GB of data transferred out and optionally per hour of caching. The exact number on your bill depends on which API type your workload uses. Teams that run REST APIs when HTTP APIs would do the same job end up paying more than three times what they need to.

This guide breaks down every charge line, gives you worked dollar examples across different request volumes, and shows where the biggest savings actually are.

API Type

Cost Per Million Calls

Free Tier (12 months)

HTTP API

$1.00 (first 300M), then $0.90/M

1M calls/month

REST API

$3.50 (first 333M), tiered to $2.38/M

1M calls/month

WebSocket API

$1.00/M messages + $0.25/M connection-minutes

1M messages + 750K connection-minutes/month

Source: Amazon API Gateway Pricing

Additional charges to plan for:

  • Data transfer out: $0.09/GB after the first 100 GB free per month

  • Caching (REST only): starts at $0.02/hr for a 0.5 GB cache

  • VPC Link: $7.20/month (HTTP) or $18/month (REST)

How AWS API Gateway Pricing Works

AWS API Gateway runs on a pay-per-use model. There's no monthly seat fee, no minimum commitment and no charge for creating or deploying APIs. You pay only when requests hit the endpoint.

Pricing splits across three separate API types: REST, HTTP and WebSocket. Each has its own rate card, free tier and volume discount structure. The types are not interchangeable.

HTTP APIs handle simple Lambda proxy and HTTP proxy integrations. REST APIs support more features: caching, WAF integration, usage plans, per-method throttling and custom authorizers. WebSocket APIs maintain persistent two-way connections and bill on a completely different model.

Understanding which type your workload uses is the starting point for any accurate cost estimate. Most teams that build new services today qualify for HTTP APIs but default to REST out of habit and the cost difference compounds fast.

For teams building serverless architectures where API Gateway is one piece of a larger cost picture, FinOps for Serverless Workloads covers how to model Lambda and API Gateway costs together so you see the real per-request spend.

REST API Pricing

REST APIs are the original API Gateway product and carry the highest per-request rate. AWS charges $3.50 per million API calls received, per the AWS pricing page. At scale, the rate steps down based on monthly volume:

Monthly Request Volume

Price Per Million Calls

First 333 million

$3.50

Next 667 million (333M to 1B)

$2.80

Above 1 billion

$2.38

REST APIs support a full feature set unavailable on HTTP APIs:

  • Built-in response caching per stage

  • AWS WAF integration for request filtering

  • Custom domain names with base path mappings

  • Canary release deployments

  • Per-stage and per-method throttling

  • Usage plans with API key management

If your architecture depends on WAF rules or caching for backend protection, REST API is the only option. But if you're running Lambda proxy without those features, REST API costs 3.5x more per million calls for no functional gain.

HTTP API Pricing

HTTP APIs are the lower-cost option for Lambda and HTTP proxy integrations. AWS charges $1.00 per million API calls for the first 300 million requests per month, then $0.90/M above that, per the AWS pricing page:

Monthly Request Volume

Price Per Million Calls

First 300 million

$1.00

Above 300 million

$0.90

HTTP APIs support:

  • JWT authorizers (Cognito, Auth0, Okta)

  • Lambda proxy and HTTP proxy integrations

  • Automatic CORS configuration

  • Private integrations via VPC Link

HTTP APIs do not support:

  • AWS WAF integration

  • Per-stage response caching

  • Lambda custom authorizers beyond JWT

  • Usage plans and API keys

Switching from REST to HTTP APIs cuts your per-request cost by roughly 71%. Teams running 100 million calls per month save $250/month on API Gateway alone just from this change, before any other optimizations. For most microservices and backend-for-frontend patterns, the missing features don't apply.

WebSocket API Pricing

WebSocket APIs bill on two dimensions, per the AWS pricing page:

Billing Dimension

Rate

Messages (sent or received)

$1.00 per million messages

Connection-minutes

$0.25 per million connection-minutes

Connection-minutes accumulate continuously for any open connection, whether or not messages are being sent. A single idle WebSocket connection open for a full month generates roughly 43,800 connection-minutes, which costs around $0.011 per connection per month. At 10,000 concurrent idle connections, that's $110/month in connection-minute charges before a single message is sent.

AWS API Gateway Free Tier

AWS API Gateway includes a 12-month free tier that resets each calendar month. The free tier covers:

  • 1 million REST API calls per month

  • 1 million HTTP API calls per month

  • 1 million WebSocket messages per month

  • 750,000 WebSocket connection-minutes per month

After the 12-month window closes, charges apply from the first call. There's no grace period and the free tier doesn't carry over between months. For teams running low-volume internal tools or development environments, the free tier covers most usage indefinitely if kept under the limits; the 12-month restriction applies only to new accounts.

For visibility into how quickly you're consuming free tier allowances across multiple AWS services, the Amnic FinOps platform gives you a single view of credit consumption and approaching paid thresholds, so you're not caught off guard when the billing period changes.

The $200 New Account Credit for New AWS Accounts

AWS introduced a $200 promotional credit for accounts created on or after July 15, 2025, per the AWS pricing page. This credit applies across AWS services, not just API Gateway. Services it offsets include:

  • Amazon API Gateway calls

  • AWS Lambda invocations

  • Amazon EC2 compute

  • Amazon S3 storage

For new accounts in early-stage development, the $200 credit combined with the free tier typically covers 2 to 3 months of moderate testing without any real charges. The credit expires after its stated validity window and doesn't roll over.

Data Transfer and Caching Costs

Per-request charges are only part of the API Gateway bill. Data transfer out and optional caching both add to the total and at scale they can rival or exceed the per-call costs. AWS charges $0.09 per GB of data transferred from API Gateway to the internet, after the first 100 GB free per month. Transfer between API Gateway and AWS services within the same region costs nothing.

Response payload size drives this charge directly. An API returning 10 KB per call at 10 million calls per month sends roughly 100 GB, right at the free tier ceiling. At 20 million calls with the same payload size, you're at 200 GB, adding around $9.00/month in egress fees. Payload-heavy APIs at 100 million calls per month with a 5 KB average response transfer approximately 476 GB, adding $34/month in data transfer costs on top of per-call charges.

API Caching Costs

Caching is only available on REST APIs. AWS charges by the hour based on the cache size you provision:

Cache Size

Hourly Rate

Approx. Monthly Cost

0.5 GB

$0.020/hr

$14.40

1.6 GB

$0.038/hr

$27.36

6.1 GB

$0.200/hr

$144.00

13.5 GB

$0.500/hr

$360.00

28.4 GB

$1.000/hr

$720.00

58.2 GB

$1.900/hr

$1,368.00

118 GB

$3.800/hr

$2,736.00

Source: Amazon API Gateway Pricing

Caching reduces the number of calls that reach your backend, which lowers Lambda invocation costs and backend load. Whether the cache cost offsets the savings depends on your cache hit rate and backend execution duration.

VPC Link Pricing

Private API integrations that route traffic to resources inside a VPC use VPC Link. Key costs to know:

  • HTTP API VPC Link: $7.20/month per link

  • REST API VPC Link: $18.00/month per link

  • Data processing: $0.01/GB for traffic passing through the link (both types)

AWS API Gateway Cost Examples

These examples use us-east-1 pricing and exclude caching, VPC Link and data transfer costs. Free tier is not deducted; figures reflect full pay-as-you-go rates for a clean comparison.

Example 1: 1 Million Requests Per Month (Free Tier Period)

API Type

Monthly Charge

HTTP API

$0

REST API

$0

WebSocket (1M messages + 250K connection-minutes)

$0

During the 12-month free tier period, 1M calls per month across any API type costs nothing.

Example 2: 10 Million Requests Per Month

API Type

Monthly Charge

HTTP API

$10.00

REST API

$35.00

WebSocket (10M messages + 2.5M connection-minutes)

$10.63

The REST vs HTTP gap at this volume is $25/month, or $300/year for a single API.

For comparison, backend compute costs at equivalent traffic scales behave very differently. See Aws EC2 costs full breakdown for how EC2 pricing stacks up when API Gateway is backed by EC2 instead of Lambda.

Example 3: 100 Million Requests Per Month

API Type

Monthly Charge

HTTP API

$100.00

REST API

$350.00

WebSocket (100M messages + 25M connection-minutes)

$106.25

At 100M requests, a 5 KB average response adds roughly $34/month in data transfer fees on top. The REST vs HTTP gap alone is $250/month, or $3,000/year, for a single high-traffic API.

5 Ways to Cut Your AWS API Gateway Bill

The biggest savings come from choosing the right API type, controlling egress and tagging for visibility. Most teams recover meaningful spend from the first two tactics alone, with no architectural changes beyond switching API types. Here's where to start:

  • Switch REST APIs to HTTP APIs wherever feature requirements allow

  • Route cacheable traffic through CloudFront to eliminate egress charges

  • Set throttling limits to cap runaway billing exposure

  • Compress response payloads to cut data transfer costs

  • Tag every API and alert on spend anomalies

Switch REST APIs to HTTP APIs

For integrations that don't need WAF, caching, or usage plans, HTTP APIs deliver the same routing at 71% lower cost per call. Audit each REST API for feature dependency before migrating. The dependencies that block migration are:

  • AWS WAF rule groups on the API

  • Per-stage or per-method response caching

  • Usage plans tied to API keys for rate limiting

  • Lambda custom authorizers that go beyond JWT validation

Most Lambda proxy integrations have none of these. One pattern that works well: deploy the HTTP API in parallel, validate it with a canary split of traffic, then swap DNS when stable.

Route Traffic Through CloudFront

Data transfer from API Gateway to CloudFront is free. For cacheable API responses, placing CloudFront in front eliminates most egress charges. AWS supports this architecture pattern natively and it typically improves response times for distributed clients as a side effect.

For a broader view of AWS savings options, AWS Savings Plans vs Reserved Instances covers the commitment-based discounts that apply to Lambda and EC2 workloads running alongside API Gateway.

Set Throttling Limits Per Stage or Method

Throttling doesn't reduce the per-call rate, but it protects against runaway request volumes from clients with retry loops or misconfigured SDK settings. Per-method limits in REST APIs or account-level limits in HTTP APIs cost nothing to configure and cap your maximum monthly exposure.

Most teams set throttling conservatively in development and staging, then tune based on measured peak traffic in production.

Compress Response Payloads

API Gateway supports GZIP payload compression natively. To enable it:

  1. Open the API stage settings in the AWS Console

  2. Enable content encoding and set a minimum compression size (1 KB is a good starting point)

  3. Clients that send Accept-Encoding: gzip automatically receive compressed responses

On JSON-heavy APIs, this typically cuts payload size by 60 to 80%, reducing data transfer costs proportionally.

Tag APIs and Monitor Spend Per Service

Without cost allocation tags on API Gateway deployments, all charges appear as a single undifferentiated line item in Cost Explorer. Apply tags at the API level using AWS cost allocation tagging to split spend by team, environment, or product.

Then set up spend alerts so unexpected request volume shows up before month-end. Amnic's anomaly detection catches billing spikes in API Gateway and other AWS services the same day they appear, giving your team time to investigate before the invoice closes.

Frequently Asked Questions

Is AWS API Gateway free?

AWS gives you 1M REST API calls, 1M HTTP API calls and 1M WebSocket messages per month free for 12 months. After 12 months, charges apply from the first call with no grace period.

What's cheaper: HTTP API or REST API?

HTTP APIs cost $1.00/M requests vs $3.50/M for REST APIs, roughly 71% cheaper. Use HTTP APIs unless you need WAF, per-stage caching, or usage plans.

Does AWS charge for failed API Gateway requests?

Yes. AWS charges for every call received, including 4xx and 5xx responses. Throttled requests that return 429 are also billed per the AWS pricing page.

How does WebSocket API pricing work?

WebSocket APIs charge $1.00 per million messages in either direction plus $0.25 per million connection-minutes. Idle open connections still accumulate connection-minutes.

Does AWS API Gateway have a cost calculator?

Yes. Use the AWS Pricing Calculator, select API Gateway, choose your API type and enter expected request volume to get a monthly estimate.

Does AWS charge to deploy API Gateway stages?

No. Creating, deploying and staging APIs costs nothing. Charges apply only when live requests pass through the endpoint, or when caching is enabled.

FinOps OS powered by context-aware AI agents.

Start with a 30-day no-cost trial.

Read-only.

No credit card.

No commitment.

Want to assess how your FinOps journey can scale?

Benchmark maturity, close governance gaps, and drive ROI in under 20 minutes

Can your engineering context keep up with the speed of AI?

Start with a 14-day Runtime Accountability Audit. Read-only access. No commitment.

No credit card · No migration · No agents

STAY AHEAD

Can your engineering context keep up with the speed of AI?

Start with a 14-day Runtime Accountability Audit. Read-only access. No commitment.

No credit card · No migration · No agents

STAY AHEAD

Can your engineering context keep up with the speed of AI?

Start with a 14-day Runtime Accountability Audit. Read-only access. No commitment.

No credit card · No migration · No agents

STAY AHEAD