A company is migrating a web application to Amazon EC2 instances. The application requires access to an Amazon RDS for PostgreSQL database. To comply with security policies, the database credentials must be encrypted at rest and automatically rotated every 30 days without causing application downtime. Which combination of actions should a solutions architect perform to meet these requirements? (Select TWO.)
- Store the database credentials in AWS Secrets Manager.Answer
- Configure AWS Secrets Manager to rotate the database credentials automatically using an AWS Lambda function.Answer
- CStore the database credentials as a standard String parameter in AWS Systems Manager Parameter Store.
- DStore the database credentials as a SecureString parameter in AWS Systems Manager Parameter Store and enable automatic annual rotation of the customer managed AWS KMS key.
- EStore the database credentials in a plaintext environment variable within the EC2 instance launch template.
Answer
Store the database credentials in AWS Secrets Manager, and configure AWS Secrets Manager to rotate the database credentials automatically using an AWS Lambda function.
AWS Secrets Manager is designed specifically to secure database credentials. Storing credentials in Secrets Manager ensures encryption at rest, and configuring Secrets Manager automatic rotation via an AWS Lambda function updates both the secret and the Amazon RDS database, fulfilling all requirements securely without downtime.
Step-by-Step Solution
Key Concept
AWS Secrets Manager is the standard service for storing, encrypting, and automatically rotating database credentials.