A company is designing a serverless application using AWS Lambda that needs to retrieve a database password to access an Amazon RDS DB instance. The company also uses an AWS Key Management Service (AWS KMS) customer managed key to encrypt sensitive configuration files stored in Amazon S3. The security team requires that the database password be rotated every 30 days and the KMS key be rotated annually, while ensuring that all historically encrypted data remains accessible.
Which of the following actions should the solutions architect take to meet these requirements? (Select TWO.)
- Store the database password in AWS Secrets Manager and configure automatic rotation for the secret every 30 days using an AWS Lambda function.Answer
- Enable automatic key rotation on the KMS customer managed key, which creates a new key version annually and retains older versions to decrypt existing data.Answer
- CStore the database password as a plain String parameter in AWS Systems Manager Parameter Store and enable automatic version rotation.
- DEnable automatic key rotation for the customer managed key, and run a scheduled script to decrypt and re-encrypt all S3 objects using the new key version immediately after rotation.
- EStore the database password in AWS Systems Manager Parameter Store as a SecureString, and delete the previous versions of the KMS key annually after rotating the key to ensure compliance.
Answer
Store the database password in AWS Secrets Manager with automatic 30-day rotation, and enable automatic key rotation on the customer managed key to rotate key material annually while retaining older versions.
The correct architecture stores the database password in AWS Secrets Manager with automated rotation via an AWS Lambda function, and enables automatic key rotation on the customer managed key. Secrets Manager secure storage prevents exposure of credentials and automates rotation. KMS automatic key rotation creates a new key version annually but preserves all previous key material, allowing transparent decryption of existing files without manual re-encryption.
Step-by-Step Solution
Key Concept
AWS KMS key rotation mechanisms and AWS Secrets Manager credential rotation