What is AWS API Gateway?
Why Interviewers Ask This
This question targets practical, hands-on experience with AWS / Cloud Computing. Interviewers want to see if you've worked with these concepts in real projects, not just read about them. Strong answers include concrete examples.
Answer
Amazon API Gateway is a fully managed service for creating, publishing, maintaining, monitoring, and securing REST, HTTP, and WebSocket APIs at any scale. No servers to manage — gateway handles traffic management, authorization, throttling, monitoring, API version management. API types: (1) REST API: feature-rich, supports all API Gateway features. Request/response transformation, caching, API keys, usage plans, stage variables. More expensive; (2) HTTP API: lower latency, simpler, cheaper (up to 70% less than REST). Supports JWT authorizers, Lambda proxy, CORS. Missing: API caching, request/response transformation, API keys (use for newer APIs); (3) WebSocket API: bi-directional persistent connections for real-time (chat, gaming, streaming). Key features: Stages and deployments: dev, staging, prod stages with separate settings; Throttling: account-level (10K RPS, 5K burst), stage-level, method-level limits; Caching: REST API cache responses (0.5GB to 237GB), reduce backend calls; Authorization: IAM, Cognito User Pools, Lambda authorizers (custom auth logic); Request/response transformation: mapping templates (VTL) to transform payloads; API keys + Usage plans: monetize APIs, enforce quotas; CORS: configure cross-origin headers; Lambda integration: Lambda Proxy (passthrough) or custom integration; VPC Link: private integration to ALB/NLB in VPC. Integration: Lambda (serverless backend), HTTP backend (EC2, ECS, external APIs), AWS services (SQS, DynamoDB, SNS). Pricing: REST: $3.50/million API calls; HTTP: $1.00/million; WebSocket: $1.00/million connections + $1.00/million messages.
Common Mistake
Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real AWS / Cloud Computing project.