An enterprise is designing a deployment pipeline for a new microservice backend consisting of Amazon API Gateway and AWS Lambda. The deployment pipeline must release updates to the Lambda function according to the following requirements:
- The new version must receive exactly of the incoming API traffic immediately upon deployment.
- The remaining of the traffic must be routed to the new version after a -minute stabilization period.
- If the new version experiences elevated error rates or response latencies during this -minute window, the traffic must automatically and immediately revert to the previous stable version.
Which two actions should the solutions architect combine to design this deployment strategy? (Select two.)
- Configure AWS CodeDeploy to use the CodeDeployDefault.LambdaCanary10Percent10Minutes deployment configuration.Answer
- Create Amazon CloudWatch alarms to monitor Lambda errors and API Gateway errors, and configure the CodeDeploy deployment group to roll back the deployment when any alarm is triggered.Answer
- CConfigure AWS CodeDeploy to use the CodeDeployDefault.LambdaLinear10Percent10Minutes deployment configuration.
- DDeploy the update using AWS CloudFormation with the UpdatePolicy attribute set to RollingUpdate, configuring a -minute pause before marking the update complete.
- EConfigure an Amazon API Gateway canary release deployment with a stage variable weight of , and use a custom AWS Lambda function to update the weight to after minutes.
Answer
Configure AWS CodeDeploy to use the canary deployment configuration along with Amazon CloudWatch alarms to monitor and automatically roll back the deployment.
To satisfy the deployment requirements with minimal operational overhead, the solutions architect should use AWS CodeDeploy to manage traffic shifting for the Lambda function. The Canary 10 percent 10 minutes configuration routes of the traffic to the new version immediately and shifts the remaining after a -minute testing window. By configuring CloudWatch alarms for Lambda errors and API Gateway errors and attaching them to the CodeDeploy deployment group, the deployment will automatically roll back if any issues are detected.
Step-by-Step Solution
Key Concept
AWS CodeDeploy Canary Traffic Shifting with Automated Rollbacks