DVA-C02 · Question #197
A company developed an API application on AWS by using Amazon CloudFront, Amazon API Gateway, and AWS Lambda. The API has a minimum of four requests every second. A developer notices that many API use
The correct answer is B. Override the cache method in the selected stage of API Gateway. Select the POST method.. Amazon CloudFront does not cache the responses to POST, PUT, DELETE, and PATCH requests – these requests are proxied back to the origin server. You may enable caching for the responses to OPTIONS requests.
Question
A company developed an API application on AWS by using Amazon CloudFront, Amazon API Gateway, and AWS Lambda. The API has a minimum of four requests every second. A developer notices that many API users run the same query by using the POST method. The developer wants to cache the POST request to optimize the API resources. Which solution will meet these requirements?
Options
- AConfigure the CloudFront cache. Update the application to return cached content based upon the
- BOverride the cache method in the selected stage of API Gateway. Select the POST method.
- CSave the latest request response in Lambda /tmp directory. Update the Lambda function to check
- DSave the latest request in AWS Systems Manager Parameter Store. Modify the Lambda function
How the community answered
(40 responses)- A3% (1)
- B83% (33)
- C5% (2)
- D10% (4)
Explanation
Amazon CloudFront does not cache the responses to POST, PUT, DELETE, and PATCH requests – these requests are proxied back to the origin server. You may enable caching for the responses to OPTIONS requests.
Community Discussion
No community discussion yet for this question.