Home › Forums › AWS › AWS Certified Developer Associate › Question about getting updated data from API GW with LEAST effort › Reply To: Question about getting updated data from API GW with LEAST effort
-
Hi Arghya,
Thank you for posting your inquiry. First of all, were you able to read the provided explanation in the first place, including the AWS reference that comes along with it? It’s pretty clear that you haven’t.
I don’t quite agree with your point that the given answers are incorrect simply because of the phrase “LEAST amount of effort”. Option C is wrong because this option is suggesting to force reload the API Cache via the no-cache setting, which will contradict the requirement of improving the latency requests. It’s incorrect not because of the English language semantics in the scenario, but due to its technical inaccuracy. The no-cache and max-age=0 settings are almost similar, but they do have some key differences.
Based on our explanation, the 2 correct answers are options B and E as shown below:
- OPTION B: Include Cache-Control: max-age=0 HTTP header on the API request.
- OPTION E: Grant permission to the client to invalidate caching when there’s a request using the IAM execution role.
Those two options are the correct answer based on the official AWS documentation that we included in our references. Pasting the link again for everybody’s reference:
You said:
But if the words would have been “What should the developer IDEALLY do to resolve the issue? (Select TWO.)” – the answer would have been straight-forward – because the ideal solution is provided by AWS & there is no second opinion about it.
Again, the answers that we have provided are actually based on the above documentation that is provided by AWS team itself. There is no second opinion about it.
On the contrary, you have NOT even shared a single piece of documentation that using Cache-Control: max-age=0 is recommended to invalidate the API Cache in API Gateway. Please be reminded that the Cache-Control values could have a different value in different systems.
OPTION C is shown as follows:
Include Cache-Control: no-cache HTTP header on the API request.
Setting the Cache-Control is not a good option in this case. Moreover, the scenario explicitly mentioned that it is using API Caching to improve/reduce the latency of the requests.
Take note, that the Cache-Control: no-cache option will require the caches to revalidate each request with the origin server. This will configure the caches to always check for content updates while reusing stored content. This will effectively cause increased latency to your requests since it will hit the origin and fetch the results directly from the database/data source each and every time.
So what’s our rationale as to why we tagged this option as incorrect? In our provided explanation, we mentioned that:
The option that says: Include Cache-Control: no-cache HTTP header on the API request is incorrect. Although “no-cache” is a valid value for the Cache-Control HTTP header, it is not the right value when invalidating API Gateway cache. The Cache-Control: max-age=0 header must be used.
The idea here is to invalidate the stale data in the API Gateway cache. The correct answers are already mentioned in the official AWS documentation. This document should be our source of truth:
I do know AWS Certifications are not English Proficiency tests, like IELTS. That’s why our provided answers are based on what is mentioned in the official AWS documentation, and not on our own unsubstantiated opinion.
Let us know if you need further assistance. The Tutorials Dojo team is dedicated to help you pass your AWS exam on your first try!
Regards,
Jon Bonso @ Tutorials Dojo