A company is deploying a three-tier web application on Amazon EC2 instances. The application needs to retrieve a database password to connect to an Amazon RDS DB instance, as well as an external API key that does not support automated rotation. Security requirements dictate that all credentials must be encrypted at rest, and the database password must be rotated every 30 days.
Which solution meets these requirements with the least administrative effort?
- AStore the database password in AWS Secrets Manager. Enable automatic rotation on the associated KMS customer managed key, which will automatically rotate the database credentials and re-encrypt the database table contents every 30 days.
- Store the database password in AWS Secrets Manager and enable automatic rotation every 30 days using the built-in integration for Amazon RDS. Store the external API key as a SecureString parameter in AWS Systems Manager Parameter Store.Answer
- CStore both the database password and the external API key as standard String parameters in AWS Systems Manager Parameter Store to simplify credential retrieval and reduce costs.
- DStore the database password in an Amazon S3 bucket with default encryption using an AWS KMS key. Enable automatic KMS key rotation on the customer managed key to automatically re-encrypt the existing credentials file with a new key version every 30 days.
Answer
Store the database password in AWS Secrets Manager with automatic RDS rotation, and store the API key as a SecureString parameter in Systems Manager Parameter Store.
The correct solution stores the database password in AWS Secrets Manager because it has built-in integration to automatically rotate RDS credentials. The external API key is stored as a SecureString parameter in Systems Manager Parameter Store, which encrypts the value at rest using AWS KMS, meeting all security requirements with the least operational effort.
Step-by-Step Solution
Key Concept
Distinction between AWS Secrets Manager and Systems Manager Parameter Store, and the operational behavior of KMS key rotation vs credential rotation.