AWS Certified Solutions Architect - Professional / Question #683 of 529

Question #683

A company operates a data processing pipeline using an AWS Lambda function. The function configures batch size and timeout settings through environment variables. The company frequently updates these variables to optimize performance. After validating new settings, they publish a new Lambda version and update their application to invoke the new version's ARN. This process causes application downtime during updates.

A solutions architect must streamline this process to eliminate downtime with minimal operational overhead.

Which solution meets these requirements?

A

Modify the environment variables of the existing Lambda function version. Use the $LATEST version for testing new configurations.

B

Store the batch size and timeout settings in an Amazon RDS database. Update the Lambda function to fetch parameters from the database.

C

Hardcode the configuration parameters within the Lambda function code. Publish a new version each time parameters are updated.

D

Create a Lambda function alias. Configure the application to use the alias ARN. Update the alias to point to new versions after testing.

Explanation

The correct answer is D. Lambda aliases act as pointers to specific function versions. By configuring the application to use an alias ARN, updates can be made by redirecting the alias to a new version without changing the application's invocation target. This ensures zero downtime during updates.

Option A is incorrect because modifying environment variables of existing versions is not possible (versions are immutable), and using $LATEST is unsafe for production. Option B introduces operational overhead by requiring a database and additional code to fetch parameters. Option C does not resolve downtime, as hardcoding parameters still requires redeploying new versions and updating the application's ARN. Key takeaway: Aliases enable seamless version switching, making them ideal for zero-downtime deployments with minimal overhead.

Answer

The correct answer is: D