A developer needs the database connection string for a Lambda function to be changeable without modifying the function code, to simplify testing and deployments. What is the best way to meet this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Store the connection string as a secret in AWS Secrets Manager..
Why this is the answer
Storing the connection string in AWS Secrets Manager is the best approach because it allows for centralized management and secure retrieval of sensitive information like database credentials. Secrets Manager integrates well with Lambda, enabling the function to retrieve the latest connection string dynamically at runtime without code changes. This simplifies testing (e.g., switching between dev/test/prod databases) and deployments. Storing it in an IAM user account is incorrect as IAM roles and users are for access control, not data storage. AWS KMS is for encryption, not storing secrets directly. A Lambda layer is for code and dependencies, not dynamic configuration values that change frequently or contain sensitive data.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed