Amazon API Gateway (APIGW)
Regional entry point providing request routing, authentication and authorization (Cognito, JWT, Lambda Authorizers), traffic throttling, response caching, and integration with AWS Lambda or private VPC microservices via VPC Link.
AWS Container Placement
Regional / Global Managed Scope (Outside VPC Subnets)
Summary
Fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale (REST, HTTP, and WebSocket APIs).
When to Use (SAA-C03)
Use in front of AWS Lambda for serverless APIs, or use VPC Link to reach private ALB/NLB microservices.
Allowed Ingress Connections & Ports
| Source Service | Protocol | Port | Architectural Rationale |
|---|---|---|---|
| WEBCLIENT | HTTPS | 443 | Public web, mobile, and API clients |
| CLOUDFRONT | HTTPS | 443 | CloudFront custom CDN edge distribution routing to API Gateway |
| ROUTE53 | DNS | 53 | DNS custom domain name mapping to API Gateway regional domain |
| COGNITO | JWT / HTTPS | 443 | Cognito User Pool JWT Bearer token authentication |
| WAF | INSPECT | 443 | AWS WAF Regional Web ACL threat inspection and rate limiting |
Allowed Egress Targets & Ports
| Target Service | Protocol | Port | Data Flow Rationale |
|---|---|---|---|
| LAMBDA | AWS_PROXY / HTTPS | 443 | Synchronous serverless Lambda function invocation |
| NLB | TCP / HTTP | 80, 8080 | Private VPC integration via API Gateway VPC Link |
| SQS | HTTPS / AWS API | 443 | Direct service proxy asynchronous queue ingestion |
| EVENTBRIDGE | HTTPS / AWS API | 443 | Event publishing to event bus without intermediary compute |
Key Configuration Parameters & AWS Best Practices
| Parameter | Format / Example | Purpose & Rationale |
|---|---|---|
| Stage Name (apiStageName) (Required) | prod | The deployment lifecycle stage name for the API Gateway. Why: APIs must be deployed to a stage before they become addressable via HTTP/HTTPS endpoints. |
| Protocol Type (protocolType) (Required) | HTTP | The core architecture and feature set of the API Gateway. Why: HTTP APIs offer superior latency and lower cost; REST APIs provide advanced features like API keys, request validation, and WAF. |
| Endpoint Configuration (endpointType) (Required) | REGIONAL | The network distribution model for API Gateway public hostnames. Why: REGIONAL deploys within the AWS region; EDGE leverages global CloudFront PoPs; PRIVATE is reachable only inside VPCs. |
| Authorizer Type (authorizerType) | JWT | The access control authorization mechanism applied to API routes. Why: Protects backend resources by validating caller identity tokens before executing handlers. |
| Throttling Rate Limit | 10000 | The maximum steady-state request rate allowed per account or API key before HTTP 429 Too Many Requests is returned. Why: Protects downstream backend databases and Lambda functions from cascading overload. |
| VPC Link ID (vpcLinkId) | vpclink-xxxxxxxxxxxxxxxxx | Attaches an API Gateway VPC Link to route requests into private subnets without traversing the public internet. Why: Enables serverless front doors for private microservices running in private VPC subnets. |
| CORS Configuration | Object { allowOrigins, allowMethods, allowHeaders } | Configures Cross-Origin Resource Sharing headers for web browser callers. Why: Permits frontend web applications hosted on different domains to issue fetch/XMLHttpRequest calls. |
Practice Labs Using Amazon API Gateway
E-Commerce Flash Sale: EventBridge Dead-Letter Queue (DLQ) Delivery Blackhole
Configure the EventBridge rule to route failed execution events to sqs-order-dlq.…
SAA-21Decouple Synchronous Order Spike with SQS + DLQ
Buffer incoming orders asynchronously using an Amazon SQS queue with a Dead-Letter Queue (DLQ) before the work…
SAA-C03-ZEROTRUST-S3-PRESIGNEDSecure Media Streaming: Zero-Trust Cognito Auth & S3 Presigned Upload
Authenticate client with Cognito User Pool, issue presigned S3 SigV4 URL via Lambda, and upload directly to en…
BUILD-02Build: 100% Serverless Microservices REST API
Build a serverless architecture containing API Gateway, AWS Lambda, and Amazon DynamoDB, connected sequentiall…
BUILD-11Build: Event-Driven Serverless Order Pipeline
Build an event-driven architecture with API Gateway, Ingestion Lambda, EventBridge Bus, SQS Queue, SQS DLQ, Wo…
Frequently Asked Questions
Where does Amazon API Gateway live inside an AWS VPC architecture?
Valid container placement: Regional / Global Managed Scope (Outside VPC Subnets). Regional entry point providing request routing, authentication and authorization (Cognito, JWT, Lambda Authorizers), traffic throttling, response caching, and integration with AWS Lambda or private VPC microservices via VPC Link.
When should I use Amazon API Gateway on the AWS SAA-C03 exam?
Use in front of AWS Lambda for serverless APIs, or use VPC Link to reach private ALB/NLB microservices.
Can I simulate Amazon API Gateway packet routing without an AWS account?
Yes. CloudTracer simulates Amazon API Gateway along with 53 AWS services directly in your browser and exports production Terraform HCL.