nerdexam
Amazon

DVA-C02 · Question #283

A developer is optimizing an AWS Lambda function and wants to test the changes in production on a small percentage of all traffic. The Lambda function serves requests to a RE ST API in Amazon API…

The correct answer is C. Define an alias on the $LATEST version of the Lambda function. Update the API Gateway. A Lambda alias with routing configuration pointing to $LATEST enables weighted canary traffic shifting while keeping the API Gateway integration URL unchanged.

Submitted by suresh_in· Mar 5, 2026Deployment

Question

A developer is optimizing an AWS Lambda function and wants to test the changes in production on a small percentage of all traffic. The Lambda function serves requests to a RE ST API in Amazon API Gateway. The developer needs to deploy their changes and perform a test in production without changing the API Gateway URL. Which solution will meet these requirements?

Options

  • ADefine a function version for the currently deployed production Lambda function. Update the API
  • BDefine a function version for the currently deployed production Lambda function. Update the API
  • CDefine an alias on the $LATEST version of the Lambda function. Update the API Gateway
  • DDefine a function version for the currently deployed production Lambda function. Update the API

How the community answered

(51 responses)
  • A
    27% (14)
  • B
    14% (7)
  • C
    51% (26)
  • D
    8% (4)

Why each option

A Lambda alias with routing configuration pointing to $LATEST enables weighted canary traffic shifting while keeping the API Gateway integration URL unchanged.

ADefine a function version for the currently deployed production Lambda function. Update the API

Publishing a function version and updating API Gateway to point directly at the new version routes 100% of traffic to the new code immediately, not a small canary percentage.

BDefine a function version for the currently deployed production Lambda function. Update the API

Similar to A, pointing the API Gateway integration directly at a specific version with no alias routing configuration provides no mechanism for percentage-based traffic splitting.

CDefine an alias on the $LATEST version of the Lambda function. Update the API GatewayCorrect

Defining an alias on the $LATEST version and configuring a routing weight on the alias allows a percentage of invocations to be directed to the new code. Because API Gateway is configured to invoke the alias ARN (which remains constant), the API Gateway URL does not change. This allows live production testing on a subset of traffic without any URL or integration updates.

DDefine a function version for the currently deployed production Lambda function. Update the API

Creating a new Lambda function entirely results in a different ARN, which would require updating the API Gateway integration and consequently changes the observable behavior of the API endpoint configuration.

Concept tested: Lambda alias routing configuration for production canary testing

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

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice