A serverless application in CodeCommit contains hardcoded database usernames and passwords. A DevOps engineer must automatically detect and prevent hardcoded secrets. Which is the MOST secure solution that meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Associate the CodeCommit repository with Amazon CodeGuru Reviewer. Manually check the code review for any recommendations. Choose the option to protect the secret. Update the SAM templates and the Python code to pull the secret from AWS Secrets Manager..
Why this is the answer
The correct answer leverages Amazon CodeGuru Reviewer, which is designed to automatically detect hardcoded secrets and other code quality issues in your repositories, including CodeCommit. After detection, it provides recommendations, and the option to protect the secret directly integrates with AWS Secrets Manager, which is the most secure service for storing and managing sensitive information like database credentials. Updating the SAM templates and Python code to retrieve secrets from Secrets Manager ensures the application uses a secure, centralized secret management solution. Incorrect options: CodeGuru Profiler focuses on application performance, not security vulnerability detection like hardcoded secrets. Using AWS Systems Manager Parameter Store as a plain string for secrets is less secure than using Secrets Manager, which offers advanced features like automatic rotation, fine-grained access control, and integration with other AWS services.
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