APIs exposed through Amazon API Gateway have caching enabled. Customers need a way to invalidate the API cache when they are testing. What should a developer provide so customers can invalidate the API cache during testing?
Choose an answer
Tap an option to check your answer.
Correct answer: Attach an InvalidateCache policy to the IAM execution role customers use to call the API, and instruct customers to send a Cache-Control: max-age=0 HTTP header when calling the API..
Why this is the answer
The correct answer allows customers to invalidate the cache on demand. By attaching an InvalidateCache policy to their IAM execution role, customers are granted the necessary permissions. Instructing them to send a Cache-Control: max-age=0 HTTP header with their API requests signals API Gateway to bypass the cache and retrieve a fresh response from the backend, effectively invalidating the cached entry for that specific request. The other options are incorrect because: Calling an InvalidateCache API operation directly using AWS credentials is not a standard or supported method for invalidating the API Gateway cache for individual API calls. While the AWS SDK has API Gateway classes, there isn't a direct InvalidateCache operation for client-side cache invalidation in this context. Using an INVALIDATECACHE query string parameter is not a standard mechanism provided by API Gateway for cache invalidation; it relies on specific HTTP headers.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed