nerdexam
Amazon

DVA-C02 · Question #612

A company has a serverless application that uses an Amazon API Gateway API to invoke an AWS Lambda function. A developer creates a fix for a defect in the Lambda function code. The developer wants to

The correct answer is A. Publish a new version of the Lambda function that contains the updated code. C. Create an alias for the Lambda function. Configure weighted routing on the alias. Specify a 10%. Publishing a new Lambda version (A) creates an immutable snapshot of the updated code - Lambda aliases can only point to published versions, not just $LATEST. Once published, creating an alias with a weighted routing configuration (C) is the native Lambda mechanism for traffic sh

Submitted by paula_co· Mar 5, 2026Deployment

Question

A company has a serverless application that uses an Amazon API Gateway API to invoke an AWS Lambda function. A developer creates a fix for a defect in the Lambda function code. The developer wants to deploy this fix to the production environment. To test the changes, the developer needs to send 10% of the live production traffic to the updated Lambda function version. What should the developer do to meet these requirements? (Choose two.)

Options

  • APublish a new version of the Lambda function that contains the updated code.
  • BSet up a new stage in API Gateway with a new Lambda function version. Enable weighted routing
  • CCreate an alias for the Lambda function. Configure weighted routing on the alias. Specify a 10%
  • DSet up a routing policy on a Network Load Balancer. Configure 10% of the traffic to go to the new
  • ESet up a weighted routing policy by using Amazon Route 53. Configure 10% of the traffic to go to

How the community answered

(25 responses)
  • A
    72% (18)
  • B
    4% (1)
  • D
    16% (4)
  • E
    8% (2)

Explanation

Publishing a new Lambda version (A) creates an immutable snapshot of the updated code - Lambda aliases can only point to published versions, not just $LATEST. Once published, creating an alias with a weighted routing configuration (C) is the native Lambda mechanism for traffic shifting: the alias can split traffic (e.g., 90%/10%) between two specific versions, enabling a canary-style production test without any infrastructure changes.

Why the distractors are wrong:

  • B - API Gateway stages do support canary deployments, but you don't create a new stage; you configure a canary on the existing stage. More importantly, the Lambda-alias approach is the correct, self-contained solution here.
  • D - Network Load Balancers operate at Layer 4 (TCP/UDP) and are not used to route traffic between Lambda function versions; they don't integrate with Lambda this way.
  • E - Route 53 weighted routing splits DNS traffic between different endpoints (e.g., two API Gateway URLs), not between versions of the same Lambda function.

Memory tip: Think "Publish → Alias → Weight" - you must publish a version before an alias can reference it, and the alias is what holds the traffic split percentage. If a question involves Lambda canary/blue-green without changing infrastructure, the answer is always alias + weighted routing.

Topics

#Lambda Versions#Lambda Aliases#Weighted Routing#Traffic Shifting

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice