AWS Certified Developer – Associate (DVA-C02)DeploymentMedium
A developer needs to deploy a new version of a serverless application consisting of AWS Lambda functions and Amazon API Gateway endpoints. The deployment strategy requires routing a small percentage of production traffic to the new Lambda function version for a short period to monitor for errors before shifting 100% of the traffic. Which AWS CodeDeploy deployment configuration should be used for this scenario?
- ACodeDeployDefault.LambdaLinear10PercentEvery1Minute
- BCodeDeployDefault.LambdaCanary10Percent5Minutes
- CCodeDeployDefault.LambdaAllAtOnce
- DCodeDeployDefault.LambdaBlueGreen
Show answer & explanationAnswer & explanation
Correct answer: B. CodeDeployDefault.LambdaCanary10Percent5Minutes
The CodeDeployDefault.LambdaCanary10Percent5Minutes configuration shifts 10% of traffic to the new Lambda function version for 5 minutes, then shifts the remaining 90%. This aligns with the requirement to route a small percentage of traffic for monitoring before a full shift.
Why the other options are wrong
- A. LambdaLinear10PercentEvery1Minute shifts traffic linearly over several minutes, but the requirement specifically calls for a 'small percentage for a short period' followed by a full shift, which is characteristic of canary.
- C. LambdaAllAtOnce shifts 100% of traffic immediately, which does not meet the gradual, monitored rollout requirement.
- D. LambdaBlueGreen is not a standard CodeDeploy configuration for Lambda; Blue/Green is a deployment model often implemented with CodeDeploy, but not a direct configuration name like the others.
CodeDeploy Lambda Canary
A CodeDeploy deployment type for Lambda functions that allows a new version to receive a small percentage of production traffic for a specified duration before shifting all traffic, enabling real-time monitoring.
- Uses Lambda traffic shifting.
- Routes a small percentage first.
- Monitors for errors before full rollout.
Memory trick: LAMBDA-DEPLOY: Live At My Best Deployments, Always Do Everything You Can.