An enterprise is deploying a microservice application on Amazon ECS. The application requires access to a Microsoft SQL Server database running on Amazon RDS. The security team mandates that the database credentials must be encrypted at rest and rotated every 30 days without downtime or manual intervention. Which strategy should a solutions architect recommend to meet these requirements with the least operational overhead?
- Store the database credentials in AWS Secrets Manager. Configure automatic rotation using the built-in Secrets Manager rotation template integrated with a helper AWS Lambda function.Answer
- BStore the credentials as a plaintext String parameter in AWS Systems Manager Parameter Store. Write a scheduled Amazon EventBridge rule that triggers an AWS Lambda function to update the database password.
- CStore the credentials in AWS Systems Manager Parameter Store as a SecureString parameter. Enable AWS KMS automatic key rotation on the customer managed key used for encryption to automatically rotate the underlying credentials.
- DStore the credentials as a plaintext String parameter in AWS Systems Manager Parameter Store, and configure an IAM policy that allows only the application's ECS task execution role to decrypt the parameter.
Answer
Store the database credentials in AWS Secrets Manager and configure automatic rotation using the built-in Secrets Manager rotation template integrated with a helper AWS Lambda function.
AWS Secrets Manager is specifically designed for database credential management. It encrypts secrets at rest using AWS Key Management Service (KMS) and provides built-in integration with AWS Lambda to rotate credentials automatically. By using the provided rotation templates for Amazon RDS databases, a solutions architect can achieve automatic rotation with minimal operational effort.
Step-by-Step Solution
Key Concept
AWS Secrets Manager provides native support for the lifecycle management, encryption, and automatic rotation of sensitive credentials like database passwords.
Estimated Time:1m 30s