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

A developer is setting up a deployment pipeline. The pipeline includes an AWS CodeBuild build stage that requires access to a database to run integration tests. The developer is using a buildspec.yml file to configure the database connection. Company policy requires automatic rotation of all database credentials.

Which solution will handle the database credentials MOST securely?

Answer options

Correct answer: C

Explanation

Option C is the most secure method because AWS Secrets Manager is designed for managing sensitive information and supports automatic credential rotation natively. Option A is insecure due to hardcoding credentials, and while option B is better, using Secrets Manager offers enhanced security features. Option D is also insecure since storing the connection string in plaintext exposes it to potential threats.