DVA-C02 · Question #114
A company has an AWS Lambda function that processes incoming requests from an Amazon API Gateway API. The API calls the Lambda function by using a Lambda alias. A developer updated the Lambda function
The correct answer is A. Create a new version of the Lambda function. Create a new stage on API Gateway with. Lambda aliases support weighted traffic shifting, allowing a new version to receive a portion of traffic for testing without exposing it to customers using the production alias.
Question
A company has an AWS Lambda function that processes incoming requests from an Amazon API Gateway API. The API calls the Lambda function by using a Lambda alias. A developer updated the Lambda function code to handle more details related to the incoming requests. The developer wants to deploy the new Lambda function for more testing by other developers with no impact to customers that use the API. Which solution will meet these requirements with the LEAST operational overhead?
Options
- ACreate a new version of the Lambda function. Create a new stage on API Gateway with
- BUpdate the existing Lambda alias used by API Gateway to a weighted alias. Add the new Lambda
- CCreate a new version of the Lambda function. Create and deploy a second Lambda function to
- DCreate a new version of the Lambda function. Create a new API Gateway API for testing
How the community answered
(56 responses)- A84% (47)
- B2% (1)
- C9% (5)
- D5% (3)
Why each option
Lambda aliases support weighted traffic shifting, allowing a new version to receive a portion of traffic for testing without exposing it to customers using the production alias.
Creating a new Lambda version and a new API Gateway stage that points to that version allows internal developers to test via the new stage while the original API Gateway stage continues routing to the existing alias used by customers, achieving full isolation with minimal overhead.
A weighted alias splits live customer traffic between versions, which means production customers would receive requests handled by the untested new version, violating the no-customer-impact requirement.
Deploying a second Lambda function to filter requests adds unnecessary architectural complexity and operational overhead compared to simply using a new API Gateway stage.
Creating an entirely new API Gateway API for testing duplicates infrastructure unnecessarily and increases operational overhead beyond what a new stage on the existing API would require.
Concept tested: Lambda versioning and API Gateway stage isolation
Source: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html
Community Discussion
No community discussion yet for this question.