API Gateway Flashcards
API Definition
Endpoint/entry-point for applications
API Gateway Definition
Sits between applications & integrations (services)
* Highly available,
* scalable,
* Handles authorization,
* Handles throttling,
* HAndles caching,
* Handles CORS,
* Transformation,
* OpenAPI spec,
* Direct integration with AWS Services and much more
* Is a public Service and can act as a front end for services running within AWS
* Can connect to services/endpoints in AWS or on-premises
* Can proveide HTTP APIs, REST APIs and WebSocket APIs
API Gateway Endpoint types
- Edge-Optimized - Routed to the nearest CloudFront POP
- Regional - Clients in the same region
- Private - Endpoint accessible only within a VPC via interface endpoint
API Gateway Error Codes
4XX - Client Error - Invalid request on client side
* 5XX - Server Error - Valid request, backend issue
* 400 - Bad Request - Generic
* 403 - Access Denied - Authorizer denies.. WAF Filtered
* 429 - API Gateway can throttle - this means you’ve exceeded that amount
* 502 - Bad Gateway Exception - bad output returned by lambda
* 503 - Service Unavailable - backing endpoint offline? Major service issues
* 504 - Integration Failure/Timeout - 29s limit
API Gateway Caching
Cache TTL default is 300 seconds
Configurable min 0 and max 3600s
Can be encrypted
Cache size 500MB to 237GB