A company stores compliance logs in an Amazon S3 bucket. The logs are encrypted at rest using an AWS KMS Customer Managed Key. The company's security policy dictates that when the KMS key is rotated, all existing historical logs must be immediately re-encrypted under the new key version. Additionally, the log ingestion application requires database credentials that must be rotated every days. Which combination of steps will meet these security requirements in the most secure manner?
- APerform manual key rotation by creating a new customer managed key and updating the S3 bucket configuration. Delete the old customer managed key to ensure no historical logs can be read using the old key material. Store the database credentials in Systems Manager Parameter Store as a SecureString parameter and configure it to rotate every days using an AWS Lambda function.
- BEnable automatic key rotation for the customer managed key, which automatically schedules a background job to re-encrypt all historical S3 objects with the new key version. Store the database credentials in Systems Manager Parameter Store as a String parameter and write a custom script to rotate the parameter value every days.
- Enable automatic key rotation for the customer managed key. Run an Amazon S3 Batch Operations copy job to copy the S3 objects to themselves using the same key to re-encrypt historical data. Store the database credentials in AWS Secrets Manager and configure automatic rotation every days.Answer
- DLog in as the AWS account root user to manually force rotation of the AWS managed key (aws/s3). Use the AWS CLI to run a script that downloads, decrypts, and re-uploads all historical objects. Store the database credentials as a plaintext parameter in Systems Manager Parameter Store with a lifecycle policy.
Answer
Enable automatic key rotation for the customer managed key. Run an Amazon S3 Batch Operations copy job to copy the S3 objects to themselves using the same key to re-encrypt historical data. Store the database credentials in AWS Secrets Manager and configure automatic rotation every days.
The correct option correctly configures automatic rotation for the customer managed key, which creates a new key version annually while maintaining historical versions for decryption. To immediately re-encrypt existing objects under the new key version, an S3 Batch Operations copy job copies objects to themselves, applying the active new key material. Finally, it uses AWS Secrets Manager, which natively and securely manages database credential storage and automatic rotation.
Step-by-Step Solution
Key Concept
AWS KMS key rotation behavior combined with S3 Batch Operations copy actions for historical data re-encryption, and native secret management via AWS Secrets Manager.
Estimated Time:2m 30s