nerdexam
Amazon

DVA-C02 · Question #449

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%. Lambda traffic shifting uses function aliases with weighted routing to canary-test a new version against live production traffic.

Submitted by neha2k· 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. Which combination of steps will 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

(37 responses)
  • A
    57% (21)
  • B
    14% (5)
  • D
    24% (9)
  • E
    5% (2)

Why each option

Lambda traffic shifting uses function aliases with weighted routing to canary-test a new version against live production traffic.

APublish a new version of the Lambda function that contains the updated code.Correct

Publishing a new version creates an immutable snapshot of the updated code that can be referenced by an alias for traffic shifting.

BSet up a new stage in API Gateway with a new Lambda function version. Enable weighted routing

API Gateway stages do not natively support weighted routing between Lambda function versions; traffic splitting for Lambda is handled at the alias level.

CCreate an alias for the Lambda function. Configure weighted routing on the alias. Specify a 10%Correct

A Lambda alias supports weighted routing, allowing you to split traffic between two function versions - the stable version and the new one - without changing the API Gateway integration endpoint.

DSet up a routing policy on a Network Load Balancer. Configure 10% of the traffic to go to the new

Network Load Balancers operate at Layer 4 and are not designed to route traffic between Lambda function versions.

ESet up a weighted routing policy by using Amazon Route 53. Configure 10% of the traffic to go to

Route 53 weighted routing distributes traffic between different DNS endpoints (e.g., separate ALBs or IPs), not between versions of the same Lambda function.

Concept tested: Lambda alias weighted traffic shifting for canary deployments

Source: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice