
Answer-first summary for fast verification
Answer: Add an X-Amz-Invocation-Type header with 'Event' to the integration request and redeploy the API stage.
The correct answer is Option A. By adding an X-Amz-Invocation-Type header with the value 'Event' to the API Gateway integration request, the API Gateway will invoke the Lambda function asynchronously. This ensures that the API responds immediately with a status of 202 (Accepted), allowing the UI to display a message while the file is being processed in the background. This approach addresses the timeout issue without making users wait for the file processing to complete. The other options do not provide an immediate response or are incorrect configurations for the given requirements.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company's serverless application, which uses AWS Step Functions and Lambda for processing business reports, is facing timeout issues due to large or complex files. The UI team requires an immediate API response for user notifications while processing. What configuration change should be made to the API Gateway to meet these requirements?
A
Add an X-Amz-Invocation-Type header with 'Event' to the integration request and redeploy the API stage.
B
Configure the Lambda function's event maximum age for asynchronous execution.
C
Sync the API Gateway timeout with the Lambda function's timeout and redeploy the API stage.
D
The exact configuration change for the API Gateway to provide immediate responses is not explicitly stated in the question.