Amazon API Gateway:
- fully managed service to create, publish, maintain, monitor, and secure APIs at any scale
- APIs act as the "front door" for applications to access data, business logic, or functionality from our backend services
- allows creating:
- RESTful APIs
- optimized for serverless workloads and HTTP backends using HTTP APIs
- they act as triggers for Lambda functions
- HTTP APIs are the best choice for building APIs that only require API proxy functionality
- Use REST APIs if our APIs require in a single solution both:
- API proxy functionality
- API management features
- WebSocket APIs that enable real-time two-way communication applications
- supports:
- containerized workloads
- serverless workloads
- web applications
- handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including:
- traffic management
- CORS support
- authorization and access control
- throttling
- monitoring
- API version management
- has no minimum fees or startup costs. We pay for the API calls we receive and the amount of data transferred out and, with the API Gateway tiered pricing model, we can reduce our cost as our API usage scales
RESTful APIs
What is the difference between REST API endpoints (apiGateway) and HTTP API endpoints (httpApi)?
The difference between REST API endpoints (apiGateway) and HTTP API endpoints (httpApi) in Amazon API Gateway primarily comes down to features, performance, cost, and use cases.
REST API endpoints (apiGateway):
- Older, feature-rich, supports API keys, usage plans, request/response validation, custom authorizers, and more.
- More configuration options, but higher latency and cost.
- Defined under the provider.apiGateway section and function events: http.
HTTP API endpoints (httpApi):
- Newer, simpler, faster, and cheaper.
- Supports JWT/Lambda authorizers, CORS, and OIDC, but lacks some advanced REST API features.
- Defined under provider.httpApi and function events: httpApi.