Topic 1 Question 182
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?
Configure the CloudFront cache. Update the application to return cached content based upon the default request headers.
Override the cache method in the selected stage of API Gateway. Select the POST method.
Save the latest request response in Lambda /tmp directory. Update the Lambda function to check the /tmp directory.
Save the latest request in AWS Systems Manager Parameter Store. Modify the Lambda function to take the latest request response from Parameter Store.
ユーザの投票
コメント(4)
- 正解だと思う選択肢: B
A is incorrect, because of
CloudFront always caches responses to GET and HEAD requests. You can also configure CloudFront to cache responses to OPTIONS requests. CloudFront does not cache responses to requests that use the other methods. (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html)
👍 4kr50312023/10/12 - 正解だと思う選択肢: B
Why A is not correct
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.
👍 3Jing20232023/10/13 - 正解だと思う選択肢: B
The correct answer is (B).
Solution (B) is the best option because it uses the Amazon API Gateway cache to cache POST requests.
👍 2Digo30sp2023/10/06
シャッフルモード