AWS Certified Developer – Associate / Question #962 of 557

Question #962

A developer uses an AWS Lambda function in an application to process users' uploaded videos for transcoding. The developer needs to update the Lambda function code and test the changes by distributing traffic between the old and new versions.

Which combination of steps will meet these requirements? (Choose two.)

A

Publish a version of the original Lambda function. Modify the Lambda code. Publish a new version of the Lambda function.

B

Use AWS CodeDeploy to detect updates to the Lambda function. Configure CodeDeploy to gradually shift traffic from the original version to the new version.

C

Update the original Lambda function to enable a function URL. Modify the Lambda code. Publish another function URL for the updated code.

D

Create an alias pointing to the original Lambda version. Configure the alias as a weighted alias including the new version. Split traffic between versions.

E

Create an alias pointing to the original function URL. Configure the alias to include the new function URL and divide traffic between them.

Explanation

To distribute traffic between Lambda versions, you must first publish immutable versions (A). Modifying the code and publishing a new version ensures both versions are available. Creating an alias (D) allows routing traffic between versions using weights.

Option B is incorrect because CodeDeploy requires additional setup (e.g., deployment configuration) and isn't explicitly mentioned in the steps. Option C is incorrect because function URLs are tied to versions/aliases, not used for traffic splitting. Option E is invalid as aliases point to versions, not URLs.

Answer

The correct answer is: AD