DVA-C02 Question 253
Single answerYou have deployed a Lambda function for an application using versioning. You want to provide your QA team access to a stable version of the function while continuing to develop new features. Which approach allows you to achieve this using AWS Lambda versions and aliases?
- A
Create an alias pointing to the latest published version for the QA team and update the alias as new features are added.
- B
Create a specific alias for the QA team pointing to a stable version of the function and update this alias only when a new stable version is ready.
- C
Use the $LATEST version for the QA team to ensure they always use the most recent changes made to the function.
- D
Publish a new version for every change made and manually inform the QA team to switch to the correct version.
Show answer and explanation
Correct answer: B
Explanation
Aliases in AWS Lambda provide a way to reference specific versions of a Lambda function. By creating an alias for the QA team pointing to a stable version, you can ensure they consistently test the correct version without being affected by ongoing development. This approach also simplifies version management as you can update the alias when a new stable version is ready, rather than manually coordinating version updates with the QA team.
- A. Incorrect.
Incorrect: Using an alias that always points to the latest published version does not provide stability for the QA team, as they might encounter breaking changes while testing.
- B. Correct.
Correct: Creating an alias for the QA team that points to a stable version ensures they have a consistent testing environment. You can update the alias only when a new stable version is available.
- C. Incorrect.
Incorrect: The $LATEST version is mutable and includes untested changes. Using it for the QA team could lead to instability and unpredictable outcomes.
- D. Incorrect.
Incorrect: While publishing new versions is necessary, manually informing the QA team to switch versions introduces unnecessary overhead and potential for error. Using aliases is a better practice.