nerdexam
Amazon

DVA-C02 · Question #258

A developer is building a serverless application by using AWS Serverless Application Model (AWS SAM) on multiple AWS Lambda functions. When the application is deployed, the developer wants to shift 10

The correct answer is A. Set the Deployment Preference Type to Canary10Percent10Minutes. Set the AutoPublishAlias. The Canary10Percent10Minutes deployment preference type shifts exactly 10% of traffic to the new Lambda version for 10 minutes, then shifts all remaining traffic if no alarms fire.

Submitted by chiamaka_o· Mar 5, 2026Deployment

Question

A developer is building a serverless application by using AWS Serverless Application Model (AWS SAM) on multiple AWS Lambda functions. When the application is deployed, the developer wants to shift 10% of the traffic to the new deployment of the application for the first 10 minutes after deployment. If there are no issues, all traffic must switch over to the new version. Which change to the AWS SAM template will meet these requirements?

Options

  • ASet the Deployment Preference Type to Canary10Percent10Minutes. Set the AutoPublishAlias
  • BSet the Deployment Preference Type to Linear10PercentEvery10Minutes. Set AutoPublishAlias
  • CSet the Deployment Preference Type to Canary10Percent10Minutes. Set the PreTraffic and
  • DSet the Deployment Preference Type to Linear10PercentEvery10Minutes. Set PreTraffic and

How the community answered

(37 responses)
  • A
    84% (31)
  • B
    3% (1)
  • C
    3% (1)
  • D
    11% (4)

Why each option

The Canary10Percent10Minutes deployment preference type shifts exactly 10% of traffic to the new Lambda version for 10 minutes, then shifts all remaining traffic if no alarms fire.

ASet the Deployment Preference Type to Canary10Percent10Minutes. Set the AutoPublishAliasCorrect

Canary10Percent10Minutes is a predefined AWS CodeDeploy deployment preference that routes 10% of traffic to the new Lambda alias for a 10-minute bake period, then shifts 100% of traffic at once. Setting AutoPublishAlias enables Lambda versioning and alias management required for traffic shifting.

BSet the Deployment Preference Type to Linear10PercentEvery10Minutes. Set AutoPublishAlias

Linear10PercentEvery10Minutes shifts an additional 10% every 10 minutes incrementally until 100% is reached, which would take 100 minutes total. This does not match the requirement of shifting all traffic after just 10 minutes.

CSet the Deployment Preference Type to Canary10Percent10Minutes. Set the PreTraffic and

PreTraffic and PostTraffic hooks are used for running validation Lambda functions before and after deployment, not for configuring the traffic shift percentage or timing. They are optional and not required to meet this requirement.

DSet the Deployment Preference Type to Linear10PercentEvery10Minutes. Set PreTraffic and

Linear10PercentEvery10Minutes does not meet the timing requirement, and PreTraffic/PostTraffic hooks do not control the traffic shift schedule.

Concept tested: AWS SAM canary deployment preference for Lambda traffic shifting

Source: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/automating-updates-to-serverless-apps.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice