30% off every course until Sunday, October 11. Our biggest update yet, and we'd like you to try it. Applied automatically at checkout.

Choose your certification
Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.1.2.1. API Gateway Endpoints & Integrations

2.1.2.1. API Gateway Endpoints & Integrations

First Principle: API Gateway endpoints provide public or private access to your APIs, while backend integrations connect them to your application's logic, creating a seamless and secure API surface.

Three endpoint types control how clients reach your API. Edge-optimized (the default) routes requests through CloudFront's global network — best when clients are geographically distributed. Regional endpoints skip CloudFront, which is better when clients are in the same AWS region or when you manage your own CloudFront distribution. Private endpoints are accessible only from within your VPC, used for internal microservice communication.

The exam tests these distinctions: if a question mentions "clients worldwide," think edge-optimized. If it mentions "internal services" or "VPC only," think private.

  • Lambda integration: Invokes an AWS Lambda function directly. The most common integration for serverless APIs.
  • HTTP integration: Forwards requests to any publicly accessible HTTP endpoint (e.g., an EC2 instance or on-premises server).
  • AWS service integration: Directly invokes other AWS services like DynamoDB or SQS.
  • Mock integration: API Gateway returns a hardcoded response without calling any backend — useful for building a frontend before the backend exists.

The integration type names are AWS_PROXY (Lambda proxy), AWS (Lambda non-proxy, or another AWS service such as SQS SendMessage), HTTP_PROXY / HTTP, and MOCK. In non-proxy integrations, mapping templates (Velocity Template Language) on the integration request reshape the incoming body before it reaches the backend, and on the integration response reshape what goes back — strip internal fields, or turn a legacy XML response into JSON — without changing the client or the backend. With Lambda proxy integration the function must return {statusCode, headers, body} with body as a string; a malformed response produces 502 Bad Gateway. If the backend doesn't answer within the integration timeout (29 seconds by default), API Gateway returns 504 Gateway Timeout even though Lambda may keep running.

Scenario: You are developing a public-facing REST API for a mobile application that needs to serve users globally with low latency. The API's logic is implemented using AWS Lambda functions.

⚠️ Exam Trap: API Gateway "proxy integration" passes the entire request to Lambda and expects a specific response format. "Non-proxy integration" lets you transform requests/responses with mapping templates. Most exam scenarios use proxy integration.

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications