Soru

Zorluk: KolayAPI Development and Integration with Amazon API Gateway

A developer is creating a serverless microservice. The developer wants to expose an endpoint using Amazon API Gateway that passes the raw incoming HTTP request details, such as headers, query parameters, and request body, directly to a backend AWS Lambda function as a single JSON object. The solution must not require any request mapping templates. Which integration type should the developer configure in API Gateway?

  1. A
    Lambda Custom Integration
  2. Lambda Proxy IntegrationCevap
  3. C
    HTTP Proxy Integration
  4. D
    Cognito User Pool Authorizer

Cevap

Lambda Proxy Integration
Lambda Proxy Integration is the correct choice because it automatically sends the raw HTTP request details (headers, query parameters, stage variables, and body) directly to the Lambda function in a predefined JSON format. This setup removes the need for configuring integration request or response mapping templates.

Adım Adım Çözüm

1
Identify the developer's core requirement: passing the entire raw HTTP request (headers, query parameters, body) to AWS Lambda without using mapping templates.
The requirement specifies zero request mapping templates and direct forwarding of request details as a structured JSON object.
Knowing the integration constraints helps narrow down the appropriate integration type in API Gateway.
2
Evaluate the available integration types for Lambda backends.
Lambda Proxy integration automatically wraps the raw request in a standardized JSON event format, whereas Lambda Custom integration requires configuring mapping templates.
Comparing Lambda Proxy and Lambda Custom integration highlights how payload parsing and routing are handled.
3
Select the option that meets the requirements without template configuration.
Lambda Proxy Integration satisfies all criteria.
It eliminates configuration overhead by delegating request and response mapping logic directly to the code running inside the Lambda function.

Anahtar Kavram

The core differences between Amazon API Gateway integration types for AWS Lambda backend services.
Tahmini Süre:45s
Bu soruyu puanla