AWS Certified DevOps Engineer – Professional — Question 145

A company has developed a serverless web application that is hosted on AWS. The application consists of Amazon S3. Amazon API Gateway, several AWS Lambda functions, and an Amazon RDS for MySQL database. The company is using AWS CodeCommit to store the source code. The source code is a combination of AWS Serverless Application Model (AWS SAM) templates and Python code.

A security audit and penetration test reveal that user names and passwords for authentication to the database are hardcoded within CodeCommit repositories. A DevOps engineer must implement a solution to automatically detect and prevent hardcoded secrets.

What is the MOST secure solution that meets these requirements?

Answer options

Correct answer: B

Explanation

Option B is the best choice because it utilizes Amazon CodeGuru Reviewer to automatically analyze the code for hardcoded secrets and recommends using AWS Secrets Manager, which is designed for managing secrets securely. The other options either do not provide the same level of automated detection or do not recommend using AWS Secrets Manager, which is the more secure practice compared to using AWS Systems Manager Parameter Store.