A serverless web application is deployed with Lambda functions via CloudFormation. A recent release caused an outage. The deployment process needs to support canary-style releases to shift a portion of traffic to a new Lambda version. Which approach accomplishes this?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an alias for each newly deployed Lambda version and use the AWS CLI update-alias command with the routing-config parameter to split traffic between versions..
Why this is the answer
The correct approach is to use Lambda aliases with traffic shifting. Lambda aliases allow you to point to different versions of a Lambda function. The update-alias command, specifically with the routing-config parameter, enables you to specify a percentage of traffic to shift to a new version. This directly supports canary deployments by gradually shifting traffic and allowing for rollback if issues arise, without requiring a separate deployment mechanism. Incorrect options: Deploying into a separate CloudFormation stack and using Route 53 weighted routing is overly complex for Lambda versioning and doesn't directly manage the Lambda traffic shift at the function level. The update-function-configuration command does not have a routing-config parameter for traffic splitting between versions; this functionality is managed by aliases. While AWS CodeDeploy can manage Lambda traffic shifting, the question specifies using the AWS CLI for updating the alias, and CodeDeployDefault.OneAtATime is a deployment configuration, not the direct mechanism for canary releases with traffic shifting for Lambda functions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed