Q5 — AWS DVA-C02 Ch.3

Question 5 of 100 | ← Chapter 3

A developer is building a serverless application using the AWS Serverless Application Model (AWS SAM), which includes an AWS Lambda function. When the application is deployed, the developer wants to shift 10% of traffic to the new version during the first 10 minutes after deployment. If no issues occur, all traffic should then shift to the new version. Which modification to the AWS SAM template satisfies these requirements?

Correct Answer: A. Set DeploymentPreferenceType to Canary10Percent10Minutes. Set the AutoPublishAlias property to a Lambda alias.

Explanation

Option A’s Canary10Percent10Minutes deployment preference gradually shifts 10% of traffic to the new version initially and then increases traffic over 10 minutes, matching the developer’s requirement. Other options’ Linear10PercentEvery10Minutes incrementally increases traffic over time, which does not match the requirement. The PreTraffic and PostTraffic properties specify Lambda aliases for pre- and post-traffic shifting, whereas AutoPublishAlias is not a valid AWS SAM template property.