Amazon API Gateway

aws.amazon.com/api-gateway
DevOps
Weekend Project

Create, maintain, and secure APIs at any scale

How to Replace Amazon API Gateway

Overview

Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. It handles all tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization, throttling, monitoring, and API version management. APIs act as the front door for applications to access data, business logic, or functionality from backend services.

Features

30 features across 11 categories

API Lifecycle Management(3)

API Version Management

Run multiple versions of the same API simultaneously, allowing quick iteration, testing, and release of new versions. Manage multiple release stages such as alpha, beta, and production.

Custom Domain Names

Associate specific stages and versions of an API with custom domain names and manage them through API Gateway.

Stage Management

Manage multiple release stages for each API version, such as alpha, beta, and production. Each stage can be configured to interact with different backend endpoints.

API Management(1)

CORS Support

Built-in Cross-Origin Resource Sharing support for API requests.

API Types(3)

HTTP APIs

Best choice for building APIs that only require API proxy functionality. Optimized for serverless workloads and HTTP backends with up to 71% cost savings and 60% latency reduction compared to REST APIs.

RESTful APIs

Create RESTful APIs optimized for serverless workloads and HTTP backends using HTTP APIs or REST APIs. HTTP APIs are up to 71% cheaper than REST APIs.

WebSocket APIs

Build real-time two-way communication applications, such as chat apps and streaming dashboards. API Gateway maintains a persistent connection to handle message transfer between backend service and clients.

Developer Portals(2)

API Gateway PortalsPremium

Create fully managed, AWS-native developer portals for APIs. Enables centralized discovery, documentation, and governance of REST APIs across AWS infrastructure.

Portal Product OrganizationPremium

Segment APIs into structured product offerings to serve different audience needs while maintaining branded portals, access controls, and compliance.

Developer Tools(1)

Client SDK Generation

Generate client SDKs for Java, JavaScript, Android, iOS (Objective-C or Swift), and Ruby. SDKs handle API keys and sign requests using AWS credentials.

Also in: Jobber, Hugging Face, 1Password

Integrations(7)

Amazon EC2 Integration

Make calls to Amazon EC2 services from APIs.

AWS Cloud Map Integration

Route requests to IP-based services registered in AWS Cloud Map, such as ECS tasks.

AWS Elastic Beanstalk Integration

Make calls to AWS Elastic Beanstalk services from APIs.

AWS Step Functions Integration

Start AWS Step Functions state machines from API Gateway.

External HTTP Endpoints

Make calls to web services outside of AWS with publicly accessible HTTP endpoints.

Lambda Integration

Execute AWS Lambda code in your account directly from APIs. Create custom APIs to code running in AWS Lambda.

Private ALB and NLB Integration

Route requests to private resources in your VPC. Build APIs for services behind private Application Load Balancers (ALBs) and Network Load Balancers (NLBs).

Also in: ReadMe, Hugging Face, Setmore

Monitoring(3)

CloudWatch Logging

Log API execution errors to CloudWatch Logs to make debugging easier.

Custom Alarms

Set up custom alarms on API Gateway APIs using CloudWatch integration.

Monitoring and Analytics

Monitor performance metrics and information on API calls, data latency, and error rates from the API Gateway dashboard integrated with Amazon CloudWatch.

Performance(3)

API CachingPremium

Set up a cache with customizable keys and time-to-live in seconds for API data to avoid hitting backend services for each request. Optional data caching charged at an hourly rate.

CloudFront Integration

Provide end users with the lowest possible latency for API requests and responses by taking advantage of global network of edge locations using Amazon CloudFront.

Response StreamingPremium

Enable response streaming for REST APIs to stream responses as they are generated, useful for chatbots and media delivery.

Also in: Jira Service Management, Hugging Face, WordPress.com

Security(5)

API Keys Management

Create API keys, set fine-grained access permissions on each API key, and distribute them to third-party developers. Define plans that set throttling and request quota limits for each individual API key.

Authorization and Access Control

Authorize access to APIs using AWS IAM, Amazon Cognito, OAuth tokens, OIDC, OAuth2, and Lambda authorizers for custom authorization requirements.

AWS Signature Version 4 Authentication

Authorize and verify API requests to AWS services using signature version 4 for REST APIs and WebSocket APIs.

JWT and SAML Token Verification

Use AWS Lambda functions to verify and authorize bearer tokens such as JWT tokens or SAML assertions.

Private APIsPremium

Create private APIs with no data transfer out charges. Includes pricing for AWS PrivateLink VPC endpoints.

Traffic Management(1)

Traffic Management

Handle traffic management and throttle traffic to ensure backend operations withstand traffic spikes and backend systems are not unnecessarily called.

Workload Types(1)

Containerized and Serverless Workload Support

API Gateway supports containerized and serverless workloads, as well as web applications.

Pricing

Free Tier

Popular
Free
  • 1 million REST API calls received per month
  • 1 million HTTP API calls received per month
  • 1 million WebSocket messages per month
  • 750,000 WebSocket connection minutes per month

Pay-As-You-Go - HTTP APIs

Custom - $1.00/million requests (first 300M), $0.90/million (above 300M)
  • HTTP API calls - tiered pricing starting at $1.00 per million
  • Data transfer out charges
  • No minimum fees or upfront commitments

Pay-As-You-Go - REST APIs

Custom - $3.50/million (first 333M), $2.80/million (next 333M), $2.38/million (above 667M)
  • REST API calls - tiered pricing based on volume
  • Data transfer out at $0.09 per GB
  • Optional data caching at hourly rate based on cache size
  • No minimum fees or upfront commitments

Pay-As-You-Go - WebSocket APIs

Custom - $1.00 per million messages, $0.25 per million connection minutes
  • Messages sent and received charged at $1.00 per million
  • Connection minutes charged at $0.25 per million
  • Messages metered in 32 KB increments
  • No minimum fees or upfront commitments

Pay-As-You-Go - Private APIs

Custom - $3.50/million API calls + AWS PrivateLink charges
  • Private API calls at $3.50 per million
  • No data transfer out charges for API Gateway
  • AWS PrivateLink charges apply - $0.01 per AZ/hour + $0.01 per GB data processing
  • No minimum fees or upfront commitments

Pay-As-You-Go - API Gateway Portals

$125/month per Portal
  • Monthly charge includes 10 PortalProducts with 40 ProductRestEndpoints each
  • Additional PortalProducts at $12.50 per month each
  • Charges prorated based on usage within the month

Cost Calculator

Keep Paying Amazon API Gateway

Monthly$125/mo
Yearly$1.5k/yr
5-Year Total$7.5k

Build It Yourself

Est. Build Time~2 hrs
Hosting$20/mo
DifficultyVery Easy

Total Cost Comparison

1 YearSave $1.3k
SaaS
$1.5k
DIY
$240
3 YearsSave $3.8k
SaaS
$4.5k
DIY
$720
5 YearsSave $6.3k
SaaS
$7.5k
DIY
$1.2k

DIY hosting estimate based on Vercel + Supabase free/pro tiers (~$20/mo). Build time estimated from 30 features at very easy complexity.

Build vs Buy

Should you build a Amazon API Gateway alternative or buy the subscription? Estimate based on 30 features.

Buy Amazon API Gateway

Monthly cost$1,250/mo
3-year total$45,000
Time to deployDays

Build Your Own

Better Value
Development cost$12,000
Maintenance$180/mo
3-year total$18,480
Dev time~1 months

Building could save ~$26,520 over 3 years.

Estimates based on 30 features and a BuildScore of 5/5. Actual costs vary.

Integrations

12 known integrations

Amazon CloudFrontAmazon CloudWatchAmazon CognitoAmazon EC2AWS Application Load Balancer (ALB)AWS Cloud MapAWS Elastic BeanstalkAWS Identity and Access Management (IAM)AWS LambdaAWS Network Load Balancer (NLB)AWS PrivateLinkAWS Step Functions