REST API vs HTTP API vs WebSocket API
Understand the tradeoffs between REST API (feature-rich), HTTP API (low-latency, low-cost), and WebSocket API (bidirectional) and choose appropriately.
Why API Gateway Exists
Amazon API Gateway is a fully managed service that lets you create, publish, secure, and monitor APIs at any scale. It acts as the front door for your backend services—Lambda functions, EC2 instances, HTTP backends, or any AWS service. API Gateway handles traffic management, authorisation, throttling, monitoring, and API versioning, so your backend can focus on business logic rather than API infrastructure concerns.
REST API: Feature-Rich Traditional API
REST API (original API Gateway product) provides the widest feature set: request/response transformation with mapping templates, per-method throttling, usage plans with API keys, response caching, WAF integration, X-Ray tracing, resource policies, and client certificate mutual TLS. REST APIs support all integration types: Lambda, HTTP, AWS service, Mock, and Lambda Proxy. Use REST API when you need advanced features like transformation, caching, or usage plans.
All lessons in this course
- REST API vs HTTP API vs WebSocket API
- Integrations: Lambda, HTTP, and Mock
- Authorization: IAM, Lambda Authorizers, and Cognito
- Throttling, Caching, and Usage Plans