AWS Certified Developer – Associate (DVA-C02) — Question 179

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?

Answer options

Correct answer: B

Explanation

Option B is correct because overriding the cache method for the POST method in API Gateway allows for caching responses and effectively managing repeated queries. Option A does not specifically address caching for POST requests, while options C and D involve storing responses but do not leverage API Gateway's caching capabilities, which would be more efficient for this scenario.