Course menuDVA-C03

Exams / DVA-C03 / Deployment strategies and rollbacks / Question 1

DVA-C03 practice question: Deployment strategies and rollbacks (1 of 2)

Testing and Deployment A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A team deploys a Lambda function with AWS SAM, with AutoPublishAlias set to live.

For each release, 10% of invocations should shift to the new version first, and all remaining traffic should move to it 10 minutes later. The new version must pass a smoke-test Lambda function before any traffic shifts. If an error alarm enters the ALARM state during the deployment, traffic must roll back automatically.

Which DeploymentPreference meets these requirements?

Choose one answer.

  1. A. Type: Linear10PercentEvery1Minute, with the error alarm under Alarms and the smoke test under Hooks PreTraffic.
  2. B. Type: Canary10Percent10Minutes, with the error alarm under Alarms and the smoke test under Hooks PreTraffic.
  3. C. Type: Canary10Percent5Minutes, with the error alarm under Alarms and the smoke test under Hooks PostTraffic.
  4. D. Type: AllAtOnce, with the smoke test under Hooks PreTraffic and the error alarm under Alarms.
Show the answer and explanation

Answer: B

  • A. Wrong: Linear shifts traffic in equal increments, here 10% every minute. It does not move 10% first and then everything after 10 minutes, so the timing is wrong.
  • B. Right: Correct. Canary10Percent10Minutes shifts 10% first and the rest after 10 minutes. The PreTraffic hook validates the new version before any shift, and listed alarms trigger an automatic rollback. Learn more: DeploymentPreference property - AWS SAM (opens in a new tab)
  • C. Wrong: This uses a 5-minute interval instead of 10. A PostTraffic hook runs after traffic has already shifted, so it cannot keep the new version from receiving traffic.
  • D. Wrong: AllAtOnce sends every request to the new version at once. It skips the 10% canary stage and the 10-minute wait the team requires.

Explanation

SAM's DeploymentPreference uses CodeDeploy to shift traffic between alias versions. A canary type shifts a percentage first and the remainder after an interval, a PreTraffic hook validates the new version before any shift, and CloudWatch alarms listed under Alarms trigger an automatic rollback.

A canary deployment with alarm-based rollback Users reach the service through a traffic-shifting layer such as a Lambda alias, load balancer or endpoint. Most traffic goes to the current version and a small share goes to the new version. A CloudWatch alarm on the new version's errors rolls traffic back to the current version. Users Traffic shifting alias, ALB or endpoint Current version most traffic New version small share first CloudWatch alarm errors, latency roll back
SAM shifts 10 percent of traffic to the new version for 10 minutes after the PreTraffic smoke test, and the alarm can roll it back.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Deployment strategies and rollbacks? The 5 full-length practice sets have 11 more Deployment strategies and rollbacks questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets