An enterprise application hosted on Amazon ECS tasks in a private VPC must connect to a legacy PostgreSQL database hosted on-premises via an AWS Direct Connect connection. The database credentials must be rotated every 30 days to comply with security regulations. The rotation process must be automated, secure at rest, and must not require changes to the application deployment pipeline. Which database credential management solution meets these security requirements with the least operational overhead?
- Store the database credentials in AWS Secrets Manager. Configure a 30-day rotation schedule for the secret and deploy a custom AWS Lambda function within the VPC to update the credentials on both the PostgreSQL database and the Secrets Manager secret.Cevap
- BStore the database credentials as a String parameter in AWS Systems Manager Parameter Store. Configure an Amazon EventBridge rule that triggers an AWS Lambda function every 30 days to rotate the database password and update the parameter value.
- CStore the database credentials in AWS Secrets Manager encrypted with an AWS KMS Customer Managed Key (CMK). Enable automatic annual rotation on the CMK and set the rotation window to 30 days to automatically rotate the database password.
- DStore the database credentials in AWS Systems Manager Parameter Store as a SecureString parameter. Rely on the automatic rotation feature of the associated AWS KMS Customer Managed Key (CMK) to automatically regenerate the credential value and rotate it on the on-premises database every 30 days.
Cevap
Store the database credentials in AWS Secrets Manager, configuring a 30-day rotation schedule along with a custom AWS Lambda function in the VPC to update the credentials in both the database and the secret.
The correct solution uses AWS Secrets Manager, which natively orchestrates credential rotation. Because the target PostgreSQL database is legacy and on-premises, a custom Lambda function running in the private VPC is required to bridge the connectivity over AWS Direct Connect and safely update both the database password and the secrets store.
Adım Adım Çözüm
Anahtar Kavram
Secrets Manager vs Parameter Store Rotation and Encryption Mechanics