Q: 8
A developer at a company recently created a serverless application to process and show data from
business reports. The application's user interface (UI) allows users to select and start processing the
files. The Ul displays a message when the result is available to view. The application uses AWS Step
Functions with AWS Lambda functions to process the files. The developer used Amazon API Gateway
and Lambda functions to create an API to support the UI.
The company's Ul team reports that the request to process a file is often returning timeout errors
because of the see or complexity of the files. The Ul team wants the API to provide an immediate
response so that the Ul can deploy a message while the files are being processed. The backend
process that is invoked by the API needs to send an email message when the report processing is
complete.
What should the developer do to configure the API to meet these requirements?
Options
Discussion
Probably A, seen similar on practice tests. Official AWS docs and whitepapers on Lambda async invocation would help for stuff like this.
Not convinced by C, that's a common trap with API Gateway timeouts. A
A tbh, not C. The X-Amz-Invocation-Type header set to Event makes it async so the API doesn't wait for execution, that's what solves the UI timeout. C is a distraction here.
Had something like this in a mock, pretty sure A is right. If you add the X-Amz-Invocation-Type: Event header, API Gateway will call the Lambda asynchronously, so the UI gets an immediate response and doesn't time out waiting for processing. That matches what the UI team wants. Changing timeout values (like C) wouldn't help with long-running jobs. Agree?
Be respectful. No spam.