An application developer is deploying an updated version of a microservice REST API using Amazon API Gateway. To minimize blast radius, the developer wants to test the update under production conditions by routing of incoming API traffic to the new deployment. The developer also needs to monitor separate Amazon CloudWatch metrics for the test traffic and the production traffic. Once the new deployment is verified, the developer must promote it to receive of the traffic with minimum administrative overhead and without managing additional API Gateway stages. Which deployment strategy should the developer implement to meet these requirements?
- ACreate a new API Gateway stage for the updated API version, configure an Amazon Route 53 weighted routing policy to direct of the traffic to the new stage, and delete the old stage after promotion.
- BDeploy the updated microservice as a new AWS Lambda function version, configure the API Gateway stage variables to use a weighted Lambda alias pointing to the new version with a weight, and update the weight to after verification.
- Configure a canary release on the active API Gateway stage, set the canary traffic percentage to , and then promote the canary to the stage after verification.Answer
- DDeploy the new API version using a Rolling deployment strategy in API Gateway, configuring the deployment batch size to of the request volume, and roll back the deployment if alarms are triggered.
Answer
Configure a canary release on the active API Gateway stage, set the canary traffic percentage to , and then promote the canary to the stage after verification.
Configuring a canary release on the active API Gateway stage allows the developer to route a specific percentage of traffic (such as ) to a new deployment on the same stage. API Gateway automatically generates separate Amazon CloudWatch metrics for the canary traffic, which can be monitored. When verification is complete, promoting the canary updates the stage deployment to the new version and deletes the canary, meeting all requirements with the lowest administrative overhead and without managing multiple stages.
Step-by-Step Solution
Key Concept
API Gateway Canary Deployments
Estimated Time:2m 30s