AWS Certified Developer – Associate (DVA-C02) — Question 169

A developer is modifying an existing AWS Lambda function. While checking the code, the developer notices hardcoded parameter values for an Amazon RDS for SQL Server user name, password, database, host, and port. There are also hardcoded parameter values for an Amazon DynamoDB table, an Amazon S3 bucket, and an Amazon Simple Notification Service (Amazon SNS) topic.

The developer wants to securely store the parameter values outside the code in an encrypted format and wants to turn on rotation for the credentials. The developer also wants to be able to reuse the parameter values from other applications and to update the parameter values without modifying code.

Which solution will meet these requirements with the LEAST operational overhead?

Answer options

Correct answer: B

Explanation

Option B is the correct choice as it utilizes AWS Secrets Manager for sensitive database credentials, enabling secure storage and rotation with minimal operational effort. Options A and C involve additional complexity by introducing encrypted environment variables or a separate Lambda function for rotation, which increases operational overhead. Option D also complicates the solution by unnecessarily storing non-sensitive information in Amazon S3 and requiring a Lambda function for credential rotation.