A developer is updating a serverless API backend running on AWS Lambda. The deployment must minimize user-facing impact by routing of the incoming traffic to the new Lambda version for a test window of minutes, while monitoring a CloudWatch alarm. If the alarm remains green, the remaining of traffic must shift to the new version immediately. If the alarm is triggered, the deployment must revert to the original version. Which AWS CodeDeploy configuration meets these requirements?
- ACodeDeployDefault.LambdaLinear10PercentEvery10Minutes
- CodeDeployDefault.LambdaCanary10Percent10MinutesAnswer
- CCodeDeployDefault.LambdaCanary10Percent15Minutes
- DCodeDeployDefault.LambdaAllAtOnce
Answer
CodeDeployDefault.LambdaCanary10Percent10Minutes
The configuration CodeDeployDefault.LambdaCanary10Percent10Minutes routes 10% of traffic to the new Lambda version, waits 10 minutes, and then immediately routes the remaining 90% if no alarms are triggered. This perfectly aligns with the requirement for a 10-minute test window at 10% traffic followed by an immediate shift of the remaining traffic.
Step-by-Step Solution
Key Concept
AWS CodeDeploy Canary vs Linear configurations for serverless deployments
Estimated Time:1m 30s