nerdexam
Amazon

DVA-C02 · Question #198

A company is building a microservices application that consists of many AWS Lambda functions. The development team wants to use AWS Serverless Application Model (AWS SAM) templates to automatically…

The correct answer is C. Enable gradual deployments through AWS SAM templates. D. Set the deployment preference type to Canary10Percent30Minutes. Use hooks to test the. Enabling gradual deployments in AWS SAM (Option C) activates the DeploymentPreference feature, which leverages AWS CodeDeploy under the hood to automatically shift traffic between Lambda versions - no manual orchestration needed. Pairing this with Canary10Percent30Minutes…

Submitted by tom_us· Mar 5, 2026Deployment

Question

A company is building a microservices application that consists of many AWS Lambda functions. The development team wants to use AWS Serverless Application Model (AWS SAM) templates to automatically test the Lambda functions. The development team plans to test a small percentage of traffic that is directed to new updates before the team commits to a full deployment of the application. Which combination of steps will meet these requirements in the MOST operationally efficient way? (Choose two.)

Options

  • AUse AWS SAM CLI commands in AWS CodeDeploy to invoke the Lambda functions to test the
  • BDeclare the EventInvokeConfig on the Lambda functions in the AWS SAM templates with
  • CEnable gradual deployments through AWS SAM templates.
  • DSet the deployment preference type to Canary10Percent30Minutes. Use hooks to test the
  • ESet the deployment preference type to Linear10PercentEvery10Minutes. Use hooks to test the

How the community answered

(35 responses)
  • A
    9% (3)
  • B
    3% (1)
  • C
    83% (29)
  • E
    6% (2)

Explanation

Enabling gradual deployments in AWS SAM (Option C) activates the DeploymentPreference feature, which leverages AWS CodeDeploy under the hood to automatically shift traffic between Lambda versions - no manual orchestration needed. Pairing this with Canary10Percent30Minutes (Option D) is the right deployment preference because canary is designed exactly for the described use case: route 10% of traffic to the new version for 30 minutes, then make a binary go/no-go decision. SAM hooks (PreTraffic/PostTraffic Lambda functions) run automated validation during that window, making the whole process self-contained in the SAM template.

Why the distractors are wrong:

  • A - AWS SAM CLI is a local development/testing tool; using it inside CodeDeploy to invoke functions manually is not an operationally efficient production strategy.
  • B - EventInvokeConfig controls asynchronous invocation behavior (retries, destinations on success/failure); it has nothing to do with traffic shifting.
  • E - Linear10PercentEvery10Minutes is a valid strategy but wrong here: it progressively increases traffic in increments until 100%, meaning you're never just "testing a small percentage before committing." Canary keeps traffic at 10% for validation and then flips to 100%, which matches the requirement.

Memory tip: Think of a canary in a coal mine - you send a small scout (10%) first to check for danger before committing the whole crew. If the canary survives the window, everyone follows.

Topics

#AWS SAM#Lambda Deployment#Canary Releases#Automated Testing

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice