🔷
API Gateway – Endpoint Types
Edge-Optimized (Default)
- Requests are routed through CloudFront edge locations before reaching the API Gateway in its home region, reducing latency for distant users.
- CloudFront distribution is managed automatically by API Gateway.
Regional
- Optimized for clients in the same AWS Region.
- Can be paired with a custom CloudFront distribution for advanced caching and routing control.
- Avoids the extra hop through AWS’s global edge network when not needed.
Private
- Accessible only from within a VPC using an interface VPC endpoint (ENI).
- Requires an API Gateway resource policy to control access.
- Ensures the API never traverses the public internet.