Q16 — AWS DVA-C02 Ch.3
Question 16 of 100 | ← Chapter 3
A company deploys an application using AWS CloudFormation. The application integrates an Amazon API Gateway REST API with AWS Lambda functions and uses Amazon DynamoDB for data persistence. It has three environments: development, test, and production—each with its own DynamoDB table. Unexpected issues occurred when pushing changes to production, although changes succeeded in development and test. A developer needs to route 20% of traffic to a new production-stage API with the updated version, while routing the remaining 80% to the existing production-stage API. The solution must minimize the number of errors any single customer experiences. What action should the developer take to meet these requirements?
- A. Update 20% of the planned changes to the production stage. Deploy the new production stage. Monitor results. Repeat this process five times to test all planned changes.
- B. Update the Amazon Route 53 DNS record for the production API using a weighted routing policy with weight 80. Add a second Route 53 record for the same domain, configure it with a weighted routing policy with weight 20, and point it to the test-stage API.
- C. Deploy an Application Load Balancer (ALB) in front of the REST API. Update the production API’s Amazon Route 53 record to point to the ALB. Register both production and test stages as ALB targets with weights of 80% and 20%, respectively.
- D. Configure canary settings for the production-stage API. Set the percentage of traffic directed to the canary deployment to 20%. Apply the planned changes to the production stage and deploy. ✓
Correct Answer: D. Configure canary settings for the production-stage API. Set the percentage of traffic directed to the canary deployment to 20%. Apply the planned changes to the production stage and deploy.
Explanation
API Gateway supports native canary deployments, allowing precise, low-risk traffic shifting (e.g., 20% to the new version) with automatic rollback and monitoring. This minimizes impact on individual customers and eliminates external dependencies like Route 53 or ALB. Option D is the most direct, integrated, and operationally efficient approach. Options B and C introduce unnecessary infrastructure and complexity; option A is not a valid deployment strategy.