A developer is configuring a serverless application where an Amazon API Gateway REST API integrates with an AWS Lambda function using Lambda proxy integration. Which of the following requirements must be met to ensure successful request processing and client response delivery? (Select TWO.)
- The Lambda function receives the client's HTTP request details, such as headers, query parameters, and payload, directly as the input event object.Answer
- BThe developer must configure an integration request mapping template in API Gateway to transform the incoming request into the event format required by the Lambda function.
- The Lambda function must return a JSON response containing a statusCode integer and, if returning a payload, a body string.Answer
- DThe developer must configure integration responses in API Gateway to map the return properties of the Lambda function to the final HTTP status codes.
- EThe developer must implement a custom Lambda authorizer to extract and validate standard JSON Web Tokens (JWTs) issued by Amazon Cognito User Pools.
Answer
To configure a Lambda proxy integration successfully, the Lambda function receives the client's HTTP request details directly as the input event object, and it must return a properly structured JSON object that includes the statusCode and a stringified body.
The correct options state that the Lambda function receives the incoming request details directly in its event object and that it must return a JSON response with a statusCode and a body string. These are the core features of API Gateway's Lambda proxy integration.
Step-by-Step Solution
Key Concept
API Gateway Lambda Proxy Integration behavior and requirements
Estimated Time:2m 0s