Skip to main content

AWS DVA-C02 Drill: Lambda Deployment Preferences - Canary vs Linear Traffic Shifting

Jeff Taakey
Author
Jeff Taakey
21+ Year Enterprise Architect | AWS SAA/SAP & Multi-Cloud Expert.

Jeff’s Note
#

Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.

For DVA-C02 candidates, the confusion often lies in how to configure safe Lambda deployments via AWS SAM traffic shifting. In production, this is about knowing exactly which DeploymentPreference type to pick to meet precise rollout timing and percentage goals without manual intervention. Let’s drill down.

The Certification Drill (Simulated Question)
#

Scenario
#

TechWare Innovations is developing a serverless backend using AWS SAM and Lambda for their new customer management system. Their deployment pipeline must support safe Lambda version promotions. After deploying a new Lambda version, they want 10% of user traffic to be routed to the new version for exactly 10 minutes to monitor for errors. If no issues arise, the system should automatically switch 100% of traffic to the new Lambda version, minimizing downtime and ensuring smooth rollouts.

The Requirement:
#

Which modification to the AWS SAM template will implement this canary deployment strategy exactly as described?

The Options
#

  • A) Set the Deployment Preference Type to Canary10Percent10Minutes. Set the AutoPublishAlias property to the Lambda Alias.
  • B) Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set the AutoPublishAlias property to the Lambda Alias.
  • C) Set the Deployment Preference Type to Canary10Percent10Minutes. Set the PreTraffic and PostTraffic properties to the Lambda alias.
  • D) Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set the PreTraffic and PostTraffic properties to the Lambda alias.

Google adsense
#

leave a comment:

Correct Answer
#

A

Quick Insight: The Developer Imperative
#

The key is knowing that the Canary10Percent10Minutes deployment preference in AWS SAM automatically directs 10% of traffic to the new version for 10 minutes before shifting all traffic if no errors occur. The AutoPublishAlias links the deployment preference to the Lambda Alias for smooth version management. This is simpler and more precise than linear increments or manual PreTraffic/PostTraffic hooks.

Content Locked: The Expert Analysis
#

You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?


The Expert’s Analysis
#

Correct Answer
#

Option A

The Winning Logic
#

When configuring safe deployments with AWS SAM for Lambda, setting the DeploymentPreference to Canary10Percent10Minutes instructs CloudFormation to route exactly 10% of the traffic to the new Lambda version for 10 minutes automatically, before shifting 100% if no alarms are triggered. The AutoPublishAlias is necessary to automate version publishing and alias adjustment seamlessly during deployments.

  • The Canary deployment mode is the only one that meets the requirement for a one-time 10% traffic shift lasting exactly 10 minutes.
  • AutoPublishAlias simplifies continuous deployment pipelines by creating/updating Lambda versions and aliases, integrating tightly with deployment preferences.

The Trap (Distractor Analysis):
#

  • Option B incorrectly uses the Linear10PercentEvery10Minutes deployment preference. This will shift 10% of traffic every 10 minutes, meaning it would take 100 minutes total for full deployment, violating the “first 10 minutes alone” requirement.
  • Options C and D introduce manual PreTraffic and PostTraffic hooks, which are unnecessary here and increase complexity. They require Lambda functions to be manually run before/after shifting traffic, adding overhead not specified in the requirement.
  • Also, only Canary10Percent10Minutes matches the desired traffic shifting strategy precisely.

The Technical Blueprint
#

# AWS SAM snippet fragment illustrating correct usage:

Globals:
  Function:
    AutoPublishAlias: live

Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: ./src
      Handler: app.lambdaHandler
      Runtime: nodejs18.x
      DeploymentPreference:
        Type: Canary10Percent10Minutes

This config tells CloudFormation to deploy the Lambda function incrementally using a 10% canary for 10 minutes before full promotion.


The Comparative Analysis
#

Option API Complexity Performance Use Case
A Low (built-in support) Immediate 10% traffic shift for 10 minutes Canary deployments for quick rollback and safe rollout
B Low Slower rollout over 100 minutes (linear) Gradual traffic shifting over time
C High (manual hooks) Requires additional Lambda functions to run pre/post deployment Custom tasks around traffic shifting
D High (manual hooks) Same as C Same as C

Real-World Application (Practitioner Insight)
#

Exam Rule
#

For the exam, always pick Canary10Percent10Minutes deployment preference when the question specifies a quick canary traffic shift with automatic promotion.

Real World
#

In real environments, sometimes teams choose Linear deployments for steady gradual rollouts to reduce risk further, but this adds latency before full traffic shift.


(CTA) Stop Guessing, Start Mastering
#


Disclaimer

This is a study note based on simulated scenarios for the DVA-C02 exam.

The DevPro Network: Mission and Founder

A 21-Year Tech Leadership Journey

Jeff Taakey has driven complex systems for over two decades, serving in pivotal roles as an Architect, Technical Director, and startup Co-founder/CTO.

He holds both an MBA degree and a Computer Science Master's degree from an English-speaking university in Hong Kong. His expertise is further backed by multiple international certifications including TOGAF, PMP, ITIL, and AWS SAA.

His experience spans diverse sectors and includes leading large, multidisciplinary teams (up to 86 people). He has also served as a Development Team Lead while cooperating with global teams spanning North America, Europe, and Asia-Pacific. He has spearheaded the design of an industry cloud platform. This work was often conducted within global Fortune 500 environments like IBM, Citi and Panasonic.

Following a recent Master’s degree from an English-speaking university in Hong Kong, he launched this platform to share advanced, practical technical knowledge with the global developer community.


About This Site: AWS.CertDevPro.com


AWS.CertDevPro.com focuses exclusively on mastering the Amazon Web Services ecosystem. We transform raw practice questions into strategic Decision Matrices. Led by Jeff Taakey (MBA & 21-year veteran of IBM/Citi), we provide the exclusive SAA and SAP Master Packs designed to move your cloud expertise from certification-ready to project-ready.