Course menuDVA-C03

Exams / DVA-C03 / Versions, aliases and stages / Question 1

DVA-C03 practice question: Versions, aliases and stages (1 of 3)

Testing and Deployment A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A developer adds a new resource, /orders/{id}, with a GET method to a REST API in Amazon API Gateway, and saves the change.

The dev stage serves the API, and the existing paths still work. Calls to the new path return Not Found, although the method appears in the API Gateway console.

What should the developer do?

Choose one answer.

  1. A. Delete the dev stage and create it again, so that it reads the latest version of the API definition.
  2. B. Create a new deployment of the API, and choose that deployment for the dev stage.
  3. C. Clear the dev stage's cache, since the cache still holds the old API definition.
  4. D. Turn on canary release for the dev stage and send 100% of its traffic to the canary.
Show the answer and explanation

Answer: B

  • A. Wrong: Recreating the stage still points it at a deployment, so the new resource is missing until a deployment is created. It also removes the stage's settings and interrupts callers.
  • B. Right: Correct. A stage serves a deployment, which is a snapshot of the API's configuration. Changes to resources and methods reach the stage only after a new deployment is created and assigned to it. Learn more: Create a deployment for a REST API in API Gateway (opens in a new tab)
  • C. Wrong: API Gateway caches responses, not the API definition. Clearing the cache does not add the new resource to the deployed API.
  • D. Wrong: A canary still serves a deployment, and the new resource must be in a deployment first. Sending all traffic to the canary changes which deployment serves requests, not what that deployment contains.

Explanation

API Gateway serves each stage from a deployment, a snapshot of the API's configuration. Changes to resources and methods require a redeployment before any stage uses them. Clearing caches, recreating the stage or using a canary does not put the new resource into the deployment.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Versions, aliases and stages? The 5 full-length practice sets have 14 more Versions, aliases and stages questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets