Need real-time/persistent connections?
→ WebSocket API
Need transformations, API keys, usage plans?
→ REST API
Simple proxy, cost/performance optimized?
→ HTTP API
- Low latency requirements
- Cost optimization (70% cheaper)
- Simple proxy to Lambda/HTTP
- JWT/OAuth2 authorization
- Modern REST APIs
- Request/response transformation
- API keys needed
- Usage plans/throttling
- Complex request validation
Building new APIs, microservices, serverless backends
- Request/response transformation
- API keys & usage plans
- Fine-grained throttling
- Mock integrations
- SDK generation
- Request validation models
- Legacy system integration
- Cost-sensitive projects
- Ultra-low latency needs
- Simple proxy scenarios
Complex enterprise APIs, partner integrations, detailed control needed
- Bi-directional communication
- Real-time data streaming
- Chat applications
- Live dashboards
- Gaming backends
- IoT device communication
- Request-response patterns
- Traditional REST operations
- Batch processing
Real-time, persistent connections required
| Feature | HTTP API | REST API | WebSocket API |
|---|---|---|---|
| Pricing | Lowest | Moderate | Pay per message |
| Latency | Fastest | Good | Real-time |
| Authorization | JWT, OAuth2, Lambda, IAM | Lambda, Cognito, IAM, API Keys | Lambda, IAM |
| Transformations | Limited | Full VTL | Lambda only |
| Caching | No | Yes | No |
| Throttling | Basic | Advanced | Per route |
- HTTP API: Default for new projects
- REST API: When you need control
- WebSocket: Real-time only