You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Connecting API Gateway to Lambda is the most common serverless pattern on AWS. This lesson covers integration types, request/response mapping, proxy vs custom integrations, error handling, and building a complete REST API backed by Lambda functions.
API Gateway supports several integration types that determine how requests flow to your backend:
| Integration Type | Description | When to Use |
|---|---|---|
Lambda Proxy (AWS_PROXY) | Passes the entire request to Lambda as-is | Default choice — simplest approach |
Lambda Custom (AWS) | Uses mapping templates to transform request/response | When you need to reshape data between API GW and Lambda |
HTTP Proxy (HTTP_PROXY) | Forwards request to an HTTP endpoint | Proxying to existing HTTP services |
HTTP Custom (HTTP) | Like HTTP proxy but with mapping templates | Transforming requests to legacy APIs |
Mock (MOCK) | Returns a response without calling any backend | Health checks, CORS preflight, stubs |
Lambda proxy integration is the simplest and most common pattern. API Gateway forwards the entire HTTP request to Lambda in a standardised format.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.