A company is designing a deployment pipeline for a new microservice running on AWS Lambda behind an Amazon API Gateway. The business requires a deployment strategy that minimizes blast radius by routing a small portion of traffic to the new version initially. The traffic allocation must steadily increase in equal increments of every minutes until the new version receives all traffic. If any CloudWatch alarms are triggered during the deployment, AWS CodeDeploy must automatically roll back the changes. Which CodeDeploy deployment configuration should the solutions architect select to meet these requirements?
- CodeDeployDefault.LambdaLinear10PercentEvery3MinutesAnswer
- BCodeDeployDefault.LambdaCanary10Percent30Minutes
- CCodeDeployDefault.LambdaLinear10PercentEvery10Minutes
- DCodeDeployDefault.LambdaCanary10Percent5Minutes
Answer
CodeDeployDefault.LambdaLinear10PercentEvery3Minutes
The correct configuration is CodeDeployDefault.LambdaLinear10PercentEvery3Minutes because it shifts traffic to the new Lambda function version in equal increments of every minutes until the transition is complete. Combining this configuration with CloudWatch alarms associated with the CodeDeploy deployment group enables automated, rapid rollbacks if any issues are detected.
Step-by-Step Solution
Key Concept
AWS CodeDeploy deployment configurations for AWS Lambda define how traffic is shifted from the old version of a Lambda function to the new version. Linear configurations shift traffic in equal increments at regular intervals, whereas canary configurations shift a small percentage first and the remainder after a set duration.