API Gateway Flashcards
This deck aims to help retain concepts related to the API Gateway service.
Which AWS service is designed for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale?
API Gateway - highly available, scalable, and fully managed AWS service
What are the key features of API Gateway?
- Authorization
- Throttling
- Caching
- CORS
- Request/Response transformation
- OpenAPI specification support
- Direct service integration, and more
Can API Gateway be integrated with on-premises endpoints?
API Gateway can connect directly to AWS services like DynamoDB, SNS, Step Functions, Lambda, AWS-hosted and on-premises endpoints
Can you describe the typical flow of a request through API Gateway?
Request:
Clients -> API Gateway (Authorize, Validate, Transform) -> Backend Services
Response:
Backend Services -> API Gateway (Return, Prepare, Transform) -> Clients
What functionalities are available when API Gateway is connected to CloudWatch?
When integrated with CloudWatch, API Gateway provides detailed logging and metrics for requests and responses
What authentication methods does API Gateway support?
- Authorization via Cognito User Pools
- Custom authorization through Lambda functions, allowing to integrate custom identity providers (IDP)
What types of endpoints does API Gateway offer?
API Gateway supports three types of endpoints:
- Private: Accessible only within a VPC through interface endpoints
- Regional: Ideal for clients within the same AWS region
- Edge-optimized: Routes requests to the nearest CloudFront Point of Presence (PoP)
What AWS API Gateway component represents a logical reference to its lifecycle state?
Stage (e.g., dev, prod, beta, v2).
Each stage has its own deployment and is identified by a unique URL
- api.domain.com/dev
- api.domain.com/prod
What are the minimum and maximum cache sizes supported by API Gateway?
API Gateway allows caching from 500MB to 237GB
What are the minimum and maximum cache TTL values supported by API Gateway?
- Min TTL 0s
- Max TTL 3600s (1h)
- Default TTL of 300s (5m)
Is caching configured per API Gateway instance?
Caching is configured per stage and can be encrypted
What are the components of an AWS API Gateway invoke URL?
- Endpoint DNS name
- Stage
- Resource
https://1nj7l16t37.execute-api.us-east-1.amazonaws.com/stage/resource
What are the phases of AWS API Gateway integration?
- Method Request
- Integration Request
- Integration Response
- Method Response
What types of integration does AWS API Gateway support?
Requires integration request and response configuration:
- AWS: Exposes AWS service actions
- HTTP: Exposes HTTP backend endpoints
Does not requires integration request and response configuration:
- AWS_PROXY: Directly invokes an AWS Lambda function
- HTTP_PROXY: Exposes HTTP backend endpoints without transformation
- MOCK: Returns a response without calling a backend service
What AWS API Gateway component (script) modifies request parameters, body, or headers in non-proxy integrations?
Mapping Templates