A developer is writing an AWS CloudFormation template to deploy an application on Amazon EC2. The application requires two configurations: a database connection password that is sensitive and must be rotated automatically every 30 days, and an environment-specific application logging level (e.g., DEBUG or INFO) that is non-sensitive and updated frequently. Which configuration strategy should the developer implement in the template to meet these requirements securely and cost-effectively?
- Store the database password in AWS Secrets Manager and reference it using a dynamic reference. Store the logging level in Systems Manager Parameter Store and reference it using a Parameter Store dynamic reference.Cevap
- BStore both the database password and the application logging level in AWS Secrets Manager, and reference both using Secrets Manager dynamic references.
- CStore both the database password and the application logging level in Systems Manager Parameter Store, and reference both using Parameter Store parameters with the SecureString type.
- DDeploy the EC2 instance using dummy values in the template, and then manually configure the password and logging level directly on the deployed resources after stack creation.
Cevap
Store the database password in AWS Secrets Manager and reference it using a dynamic reference. Store the logging level in Systems Manager Parameter Store and reference it using a Parameter Store dynamic reference.
The correct strategy is to store the sensitive database password requiring automatic rotation in AWS Secrets Manager and reference it via dynamic references, while using Systems Manager Parameter Store for the non-sensitive logging level configuration. This aligns with AWS security best practices and cost optimization recommendations.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation dynamic references for AWS Secrets Manager and Systems Manager Parameter Store