A software engineer is building a REST API using Amazon API Gateway. They set up the API to route incoming client requests directly to an AWS Lambda function using the proxy integration type. Which two statements correctly describe how data is exchanged between API Gateway and the backend function in this configuration? (Select TWO.)
- API Gateway passes the raw HTTP request details, including headers and query string parameters, directly to the Lambda function inside the event object.Cevap
- BAPI Gateway requires the developer to define Integration Request velocity templates to map query parameters into JSON before invoking the function.
- The Lambda function must return its output in a specific JSON format containing fields such as statusCode, headers, and body.Cevap
- DAPI Gateway automatically wraps any custom string or raw object returned by the Lambda function in an HTTP 200 OK response.
- EAPI Gateway requires a custom Lambda authorizer to authenticate requests when utilizing a Lambda proxy integration.
Cevap
In a Lambda proxy integration, API Gateway passes the raw HTTP request directly to the Lambda function inside the event object, and the Lambda function must return its response in a structured JSON payload containing the statusCode, headers, and body fields.
In a Lambda proxy integration, API Gateway passes the raw HTTP request (headers, query parameters, path variables, and body) directly to the backend function as a JSON event. Additionally, the backend function must return its response in a specific JSON structure with statusCode, headers, and body fields so that API Gateway can correctly format the HTTP response to the client.
Adım Adım Çözüm
Anahtar Kavram
The behavior and payload requirements of Amazon API Gateway Lambda Proxy Integration.