🚀 EARLY ACCESS OFFER: Get CostGoat lifetime license for just $199 instead of $299! Get it now

CostGoat Logo

CostGoat

BETA
Try For Free
LAST UPDATED: NOVEMBER 1, 2025

AWS API Gateway Pricing Calculator & Complete Cost Guide

Interactive AWS API Gateway pricing calculator. Compare REST, HTTP, and WebSocket APIs with accurate cost estimates including caching and regional pricing.

CalculatorPricing GuideExamplesSave MoneyFAQ

Pricing TLDR

  • • Free Tier: 1M API calls/month for 12 months (REST & HTTP APIs)
  • • HTTP APIs: $1.00 per million requests (first 300M), then $0.90 per million
  • • REST APIs: $3.50 per million requests (first 333M), more features than HTTP
  • • WebSocket APIs: $1.00 per million messages + $0.25/million connection minutes

Amazon API Gateway Pricing Calculator

Quick Examples:

API Type

71% cheaper than REST, best for simple serverless APIs

Monthly requests

0

100M

300M

500M

AWS Region

Apply free tier (12 months)

1M requests per month free for first 12 months

Estimated Monthly Cost

$9.00

HTTP API

$9.00

✓ Free tier applied (1M requests)

About Amazon API Gateway

What is Amazon API Gateway?

Amazon API Gateway is a fully managed service that makes it easy to create, publish, maintain, monitor, and secure APIs at any scale. It acts as a front door for applications to access data, business logic, or functionality from backend services such as AWS Lambda, EC2, or any web application.

  • REST APIs: Full-featured API with caching, usage plans, API keys, and request/response validation - ideal for complex scenarios
  • HTTP APIs: Cost-optimized option (71% cheaper) perfect for simple serverless workloads with JWT authorization
  • WebSocket APIs: Real-time two-way communication for chat applications, live dashboards, and streaming data

When to Use Amazon API Gateway

Amazon API Gateway is ideal when you need a managed API layer with built-in security, monitoring, and scaling. Choose HTTP APIs for cost-sensitive serverless projects, REST APIs when you need advanced features like caching and usage plans, or WebSocket APIs for real-time bidirectional communication.

Ideal for

  • Serverless architectures with AWS Lambda backends
  • Microservices requiring unified API management and authentication
  • Mobile and web applications needing secure API access
  • Real-time applications with WebSocket support (chat, live updates)
  • APIs requiring throttling, caching, and usage analytics
  • Multi-region deployments with CloudFront integration

Not ideal for

  • Ultra-high throughput scenarios (10K+ requests/sec per endpoint may need optimization)
  • Sub-millisecond latency requirements where direct connections are critical
  • Pure GraphQL workloads (consider AWS AppSync instead)
  • Internal-only APIs that don't need public exposure or advanced management

Amazon API Gateway Pricing Breakdown

Free Tier (12 Months)

AWS offers a generous free tier for API Gateway during your first 12 months. This applies to both REST and HTTP APIs, plus WebSocket messages, making it perfect for development and low-traffic production workloads.

  • 1 million REST API calls per month for 12 months
  • 1 million HTTP API requests per month for 12 months
  • 1 million WebSocket messages for 12 months
  • No free tier for caching or VPC Link charges
  • Automatically applies to new AWS accounts
  • Resets monthly but doesn't roll over unused calls

HTTP API Pricing

HTTP APIs are 71% cheaper than REST APIs, making them ideal for cost-sensitive serverless workloads. They offer modern features like JWT authorization and CORS configuration while maintaining simplicity.

First 300 Million

$1.00 per million

Standard rate for most workloads

  • JWT authorization built-in
  • CORS configuration
  • Lambda and HTTP integrations
  • Basic throttling
  • CloudWatch metrics included

Over 300 Million

$0.90 per million

10% volume discount

  • All standard features
  • Automatic volume discount
  • Same performance and reliability

REST API Pricing

REST APIs offer premium features like caching, usage plans, API keys, and request validation. While more expensive, they're essential when you need advanced API management capabilities.

First 333 Million

$3.50 per million

Base rate with full features

  • API caching (additional cost)
  • Usage plans and API keys
  • Request/response validation
  • AWS WAF integration
  • Custom domain names

333M - 1 Billion

$2.80 per million

20% volume discount

  • All REST API features
  • Automatic tiering

1B - 20 Billion

$2.38 per million

32% volume discount

  • All REST API features
  • Significant cost reduction

Over 20 Billion

$1.51 per million

57% volume discount

  • Maximum discount tier
  • Enterprise scale pricing

WebSocket API Pricing

WebSocket APIs use dual billing: connection time and message volume. This pricing model reflects the persistent nature of WebSocket connections and the bidirectional message flow.

Connection Minutes

$0.25 per million connection minutes. Example: 1,000 concurrent users staying connected 30 minutes/day = 900K minutes/month = $0.23.

Messages (First 1B)

$1.00 per million messages sent or received. Both client-to-server and server-to-client messages count.

Messages (Over 1B)

$0.80 per million messages (20% discount). Automatic tiering for high-volume applications.

Idle Connection Costs

You pay for connection time even with no message traffic. Monitor and close idle connections to optimize costs.

Caching Costs (REST API Only)

API Gateway caching reduces backend load by storing responses. Cache charges are hourly (24/7) regardless of traffic volume:

Cache Size

0.5 GB

Hourly Rate

$0.020

Monthly Cost

$14.60

Cache Size

1.6 GB

Hourly Rate

$0.038

Monthly Cost

$27.74

Cache Size

6.1 GB

Hourly Rate

$0.200

Monthly Cost

$146.00

Cache Size

13.5 GB

Hourly Rate

$0.250

Monthly Cost

$182.50

Cache Size

28.4 GB

Hourly Rate

$0.500

Monthly Cost

$365.00

Cache Size

58.2 GB

Hourly Rate

$1.000

Monthly Cost

$730.00

Cache Size

118 GB

Hourly Rate

$1.900

Monthly Cost

$1387.00

Cache Size

237 GB

Hourly Rate

$3.800

Monthly Cost

$2774.00

💡 Cache only makes sense when backend costs exceed caching fees. For a 6.1GB cache ($146/month), you need to save $146+ in backend processing.

Regional Pricing Differences

API Gateway pricing varies by region with Asia Pacific and Middle East regions typically costing 20-35% more than US regions:

  • Standard Regions (1.00x): US East/West, EU Ireland/London/Paris/Stockholm/Frankfurt, Canada, South America
  • Premium Regions (+5-21%): EU Zurich (+16%), EU Frankfurt (+14%), EU Milan (+5%), most Asia Pacific regions (+21%)
  • High Premium Regions (+19-34%): Hong Kong (+34%), Africa Cape Town (+19%), Middle East regions (+19%)
  • Cost Optimization: Deploy in nearest standard-priced region when latency allows. Consider CloudFront for global distribution from low-cost regions.

Related Service Costs

API Gateway costs are often just 20-30% of your total API infrastructure. Budget for these common related services:

  • AWS Lambda (Typical: 2-3x API Gateway): $0.20 per 1M requests + $0.0000166667 per GB-second compute time
  • CloudWatch Logs (+15-30%): $0.50/GB ingested. Full execution logs can double your costs - use ERROR level in production.
  • AWS WAF (Security): $5/month per Web ACL + $1/month per rule + $0.60 per 1M requests. Recommended for production.
  • Data Transfer Out: $0.09/GB first 10TB. Often 10-30% additional cost for response payloads.
  • VPC Link (Private APIs): HTTP: $0.01/hour ($7.20/month), REST: $0.025/hour ($18/month) - always charged even with zero traffic

REST vs HTTP vs WebSocket API Comparison

Choose the right API type based on your requirements and budget. HTTP APIs offer the best cost-performance ratio for simple use cases.

Criteria

Base Price

HTTP API

$1.00/million

REST API

$3.50/million

WebSocket API

$1.00/million + connection time

Criteria

Volume Discount

HTTP API

$0.90/million after 300M

REST API

$1.51-2.80/million tiered

WebSocket API

$0.80/million after 1B

Criteria

Caching

HTTP API

Not available

REST API

Available ($14.60+/month)

WebSocket API

Not available

Criteria

Authorization

HTTP API

JWT, Lambda, IAM

REST API

JWT, Lambda, IAM, Cognito, API Keys

WebSocket API

Lambda, IAM

Criteria

Usage Plans

HTTP API

Not available

REST API

Available

WebSocket API

Not available

Criteria

Request Validation

HTTP API

Not available

REST API

Available

WebSocket API

Not available

Criteria

AWS WAF

HTTP API

Not available

REST API

Available

WebSocket API

Not available

Criteria

Best For

HTTP API

Serverless, cost-sensitive workloads

REST API

Complex APIs, enterprise features

WebSocket API

Chat, live updates, streaming

Real-World Amazon API Gateway Pricing Examples

Small Startup

$9/month

• HTTP API

• 10M requests/month

• Free tier applied

• Lambda backend: +$3

Mobile app backend with moderate traffic

Medium SaaS

$370/month

• REST API with cache

• 100M requests/month

• 6.1GB cache: $146

• Lambda + logs: +$130

SaaS platform with steady growth

Enterprise Microservices

$1,778/month

• REST API

• 500M requests/month

• No cache

• Lambda + WAF: +$1,040

Large-scale microservices architecture

WebSocket Chat App

$150/month

• WebSocket API

• 10K users, 30 min/day

• 60M messages/month

• Lambda: +$62

Real-time chat for 10K concurrent users

11 Amazon API Gateway Cost Optimization Tips

1

Choose HTTP APIs over REST when possible

HTTP APIs are 71% cheaper ($1.00 vs $3.50 per million). Use them for simple serverless APIs unless you specifically need REST features like caching, usage plans, or WAF integration.

2

Enable caching only when justified by backend costs

API Gateway caching costs $146-2,774/month. Only enable if backend processing costs exceed cache fees. For a 6.1GB cache ($146/month), you need to save $146+ in Lambda/database costs.

3

Optimize CloudWatch logging in production

Full execution logs can double your costs at $0.50/GB ingested. Use ERROR-level logging in production and enable detailed logs only when debugging specific issues.

4

Implement request batching to reduce call volume

Combine multiple operations into single API calls when possible. Batch processing reduces request count, which is how API Gateway charges. Can reduce costs by 50-70% for batch-friendly workloads.

5

Set throttling limits to prevent cost spikes

Configure per-client throttling and burst limits to prevent unexpected traffic spikes from third-party integrations or DoS attacks. Protects both your API Gateway and backend infrastructure costs.

6

Deploy in standard-priced regions when latency allows

Asia Pacific and Middle East regions cost 20-35% more. Deploy in US East/EU Ireland and use CloudFront for global distribution when sub-100ms latency isn't critical.

7

Close idle WebSocket connections promptly

WebSocket charges connection time even with zero message traffic. Implement heartbeat timeouts (5-10 minutes) to close inactive connections. Can reduce costs by 60-80% for apps with sporadic usage.

8

Use compression for large response payloads

Data transfer costs $0.09/GB. Enable gzip compression in API Gateway to reduce payload sizes by 70-90%. Particularly important for endpoints returning large JSON arrays or documents.

9

Leverage the 12-month free tier for development

Use the 1M requests/month free tier for dev/staging environments during first 12 months. Can save $350-1,000+ annually on non-production workloads.

10

Consider CloudFront caching for GET requests

CloudFront caching is often cheaper than API Gateway caching for cacheable content. CloudFront's price-per-request is lower, and you get global edge locations included.

11

Monitor API Gateway Costs by API Type and Region

Track API Gateway spending across REST, HTTP, and WebSocket APIs with CostGoat. Get alerts when regional pricing premiums accumulate, cache costs exceed backend savings, or WebSocket connection minutes spike from idle connections.

Monitor Your AWS Costs in Real-Time

CostGoat is a privacy-first desktop app that tracks your actual AWS spending as you use it. Get instant visibility into your usage and never get surprised by your cloud bills again. 7-day free trial, then $9/month.

Start Free Trial

Amazon API Gateway Pricing FAQ

Common questions about AWS API Gateway costs, free tier, and pricing optimization

Pricing Calculators

Claude API PricingGoogle Veo PricingAWS Lambda PricingAWS Cost CalculatorsOpenAI Sora 2 PricingOpenAI Image API Pricing
PricingDashboardContactAffiliate ProgramTermsPrivacy

© 2025 CostGoat. All rights reserved.