
Answer-first summary for fast verification
Answer: Utilize a Lambda environment variable for the table name, accessed via the programming language's standard method.
The correct option is A. Utilizing a Lambda environment variable to store the DynamoDB table name allows the developer to easily change the table name without modifying the Lambda function code. Environment variables are designed to store configuration information separately from the code, making it a simple and efficient solution for this requirement. AWS Lambda provides built-in support for environment variables, allowing you to access these variables using the standard method for the programming language used.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
In an AWS Lambda application, how can a developer avoid modifying the Lambda function code when the associated DynamoDB table name changes?
A
Utilize a Lambda environment variable for the table name, accessed via the programming language's standard method.
B
Maintain the table name in a file within the /tmp directory, accessed through the language's SDK.
C
Store the table name in a zipped file uploaded to a Lambda layer, with retrieval via the language's SDK.
D
Use a global variable in the Lambda function for the table name.
No comments yet.