AWS Certified Solutions Architect – Associate (SAA-C02) — Question 445

A company has an application that calls AWS Lambda functions. A code review shows that database credentials are stored in a Lambda function's source code, which violates the company's security policy. The credentials must be securely stored and must be automatically rotated on an ongoing basis to meet security policy requirements.
What should a solutions architect recommend to meet these requirements in the MOST secure manner?

Answer options

Correct answer: B

Explanation

AWS Secrets Manager is specifically designed to protect secrets like database credentials and natively supports automatic rotation for various database types. AWS KMS and AWS CloudHSM are designed for cryptographic key management rather than storing and rotating application credentials. Using environment variables with custom rotation scripts is less secure and increases operational complexity compared to the native rotation capabilities of Secrets Manager.