nerdexam
Amazon

DVA-C02 · Question #525

A company is building a social media application. A developer is modifying an AWS Lambda function that updates a database with data that tracks each user's online activity. A web application server…

The correct answer is B. Create an alias for the Lambda function. Configure a specific weight value for the updated. Lambda aliases support weighted traffic routing between two function versions, enabling a canary rollout where only a configured percentage of invocations execute the new code.

Submitted by skyler.x· Mar 5, 2026Deployment

Question

A company is building a social media application. A developer is modifying an AWS Lambda function that updates a database with data that tracks each user's online activity. A web application server uses the AWS SDK to invoke the Lambda function. The developer has tested the new Lambda code and is ready to deploy the code into production. However, the developer wants to allow only a small percentage of the invocations from the AWS SDK to call the new code. Which solution will meet these requirements?

Options

  • AConfigure a Lambda version that has a specific weight value for the updated Lambda function.
  • BCreate an alias for the Lambda function. Configure a specific weight value for the updated
  • CCreate an Application Load Balancer. Specify weighted target groups for the original Lambda
  • DCreate a Network Load Balancer. Specify weighted target groups for the original Lambda function

How the community answered

(47 responses)
  • A
    15% (7)
  • B
    72% (34)
  • C
    4% (2)
  • D
    9% (4)

Why each option

Lambda aliases support weighted traffic routing between two function versions, enabling a canary rollout where only a configured percentage of invocations execute the new code.

AConfigure a Lambda version that has a specific weight value for the updated Lambda function.

Lambda versions are immutable snapshots and do not themselves support weight values; weighted routing is a feature of aliases, not versions.

BCreate an alias for the Lambda function. Configure a specific weight value for the updatedCorrect

A Lambda alias can point to two different function versions simultaneously using a weighted routing configuration. By assigning, for example, 5% weight to the updated version and 95% to the original, only that fraction of AWS SDK invocations will execute the new code. This allows production validation of the new logic without exposing all users to it.

CCreate an Application Load Balancer. Specify weighted target groups for the original Lambda

Application Load Balancers support weighted target groups for HTTP-based routing but are not the appropriate mechanism for controlling which Lambda function version is invoked by an SDK call.

DCreate a Network Load Balancer. Specify weighted target groups for the original Lambda function

Network Load Balancers operate at Layer 4 (TCP/UDP) and do not provide weighted routing to Lambda function versions invoked via the AWS SDK.

Concept tested: Lambda alias weighted traffic routing between versions

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