A company is designing a secure web application that stores session logs in Amazon S3 and uses a database. The database credentials must be encrypted and rotated periodically. The session logs must be encrypted using a customer managed key in AWS KMS, and the security team requires that the KMS key be automatically rotated annually without requiring existing logs to be re-encrypted. Which of the following configurations should a solutions architect recommend to meet these security requirements? (Select TWO.)
- Enable automatic key rotation for the AWS KMS customer managed key, which creates a new backing key version annually while keeping the previous versions for decrypting older data.Answer
- Store the database credentials in AWS Secrets Manager and configure a rotation schedule using a built-in or custom AWS Lambda function.Answer
- CStore the database credentials as a Standard String parameter in AWS Systems Manager Parameter Store to allow easy rotation via parameter updates.
- DEnable automatic key rotation for the KMS key and configure an S3 Batch Operations job to re-encrypt all historical logs under the new key version immediately after rotation.
- EManually rotate the KMS key by creating a new key each year and deleting the old KMS key to ensure only the latest key version is active.
Answer
Enable automatic key rotation for the AWS KMS customer managed key, and store the database credentials in AWS Secrets Manager with an automated rotation schedule.
Enabling automatic key rotation for the KMS key generates a new backing key annually while retaining the old backing keys. This allows the application to read old data without any code changes or manual re-encryption. AWS Secrets Manager is the standard service for storing and rotating database credentials securely using Lambda.
Step-by-Step Solution
Key Concept
Key rotation and secure secret management are fundamental to AWS data encryption. AWS KMS automatic rotation handles backing key versions transparently, while AWS Secrets Manager secures and rotates database credentials using Lambda.