
Answer-first summary for fast verification
Answer: Enable caching for POST requests specifically in the API Gateway stage settings.
The optimal solution for caching POST requests is to use API Gateway’s built-in caching capabilities. API Gateway allows for the caching of responses to POST requests by configuring caching at the stage level. This leverages the native functionality of API Gateway to manage caching efficiently without requiring significant changes to the application logic. Options A, C, and D are not suitable because CloudFront does not cache POST requests, and using Lambda's /tmp directory or AWS Systems Manager Parameter Store for caching responses is not as efficient or direct a solution as using API Gateway’s caching features.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
On AWS, an API application utilizing Amazon CloudFront, API Gateway, and Lambda receives a minimum of four POST requests per second, with frequent duplicate queries. What is the optimal solution for caching these POST requests?
A
Configure CloudFront to cache responses based on default request headers and update the application accordingly.
B
Enable caching for POST requests specifically in the API Gateway stage settings.
C
Store the most recent POST response in Lambda's /tmp directory and modify the function to check this directory.
D
Store the most recent POST request in AWS Systems Manager Parameter Store and adjust the Lambda function to retrieve responses from there.
No comments yet.