An API Gateway REST API must expose Athena reports whose queries take several minutes. Which design avoids keeping an HTTP request open while still letting clients retrieve completed results?
Show the answer
Correct answerB. Return a query identifier immediately and provide endpoints for status checks and paginated results.
AWhy not this: Caching can help repeated requests, but a cache miss still requires the long-running query to finish within the request.
BWhy this is right: A query identifier separates submission from execution, while status and result endpoints support later retrieval.
CWhy not this: Waiting retains the long-running HTTP request and risks an API integration timeout.
DWhy not this: A longer Lambda timeout does not eliminate the original REST API integration's timeout constraints.
An asynchronous API returns a query identifier, allowing clients to poll for completion and retrieve results separately. Increasing a Lambda timeout does not remove the integration timeout constraints of the original API request.