AWS Certified Solutions Architect – Professional — Question 243

During a security audit of a Service team's application, a Solutions Architect discovers that a username and password for an Amazon RDS database and a set of
AWS IAM user credentials can be viewed in the AWS Lambda function code. The Lambda function uses the username and password to run queries on the database, and it uses the IAM credentials to call AWS services in a separate management account.
The Solutions Architect is concerned that the credentials could grant inappropriate access to anyone who can view the Lambda code. The management account and the Service team's account are in separate AWS Organizations organizational units (OUs).
Which combination of changes should the Solutions Architect make to improve the solution's security? (Choose two.)

Answer options

Correct answer: B, D

Explanation

Option B is correct because using AWS Secrets Manager to manage database credentials enhances security by keeping sensitive information out of the source code and enabling automatic rotation. Option D is also correct as it helps to enforce access controls between the Service team's account and the management account, reducing the risk of unauthorized access. Options A, C, and E do not adequately address the core issue of exposing sensitive credentials within the Lambda code.