Using AWS SAM, a developer wants to deploy updated Lambda functions so that 10% of traffic is routed to the new version for the first 10 minutes (canary), and if no issues occur, shift 100% of traffic to the new version. What change to the SAM template achieves this?
Choose an answer
Tap an option to check your answer.
Correct answer: Set DeploymentPreference Type to Canary10Percent10Minutes and set AutoPublishAlias to the Lambda alias..
Why this is the answer
The correct answer is to set DeploymentPreference Type to Canary10Percent10Minutes and AutoPublishAlias to the Lambda alias. AWS SAM's DeploymentPreference property, specifically the Canary10Percent10Minutes type, directly implements the desired canary deployment strategy: 10% traffic for 10 minutes, then 100% if no issues. AutoPublishAlias ensures that the Lambda function's alias is updated to point to the new version, enabling traffic shifting. Incorrect options: Linear10PercentEvery10Minutes is a linear deployment strategy, not a canary, meaning traffic would shift incrementally rather than a single canary period followed by a full cutover. Configuring PreTraffic and PostTraffic hooks is used for running validation tests before or after traffic shifting, but it doesn't define the traffic shifting strategy itself. The strategy is defined by the Type property. While hooks can be used with canary deployments, they are not the primary mechanism for defining the traffic shifting pattern.
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