A developer is designing an AWS CloudFormation template to deploy a microservice. The microservice requires access to a database password that must be automatically rotated every 30 days, as well as a non-sensitive API endpoint URL for an external service. Which two configuration strategies should the developer use to reference these values in the CloudFormation template to ensure security, rotation support, and cost-efficiency? (Select TWO.)
- Reference the database password dynamically in the template using an AWS Secrets Manager dynamic reference.Cevap
- Reference the non-sensitive API endpoint URL dynamically in the template using an AWS Systems Manager Parameter Store dynamic reference.Cevap
- CStore the database password in a standard AWS Systems Manager Parameter Store parameter and configure Parameter Store to handle the 30-day rotation.
- DStore both the database password and the non-sensitive API endpoint URL in AWS Secrets Manager, referencing both using Secrets Manager dynamic references.
- EDeploy the resources using placeholder values in the template, and then run a script to update the database password and API endpoint directly on the resources via the AWS CLI.
Cevap
Referencing the database password dynamically in the template using an AWS Secrets Manager dynamic reference, and referencing the non-sensitive API endpoint URL dynamically in the template using an AWS Systems Manager Parameter Store dynamic reference.
For sensitive credentials requiring automatic rotation, the correct practice is to store them in AWS Secrets Manager and reference them via an AWS Secrets Manager dynamic reference. For non-sensitive configurations that do not need rotation, the correct and cost-efficient practice is to store them in AWS Systems Manager Parameter Store and reference them via a Parameter Store dynamic reference.
Adım Adım Çözüm
Anahtar Kavram
Securely referencing sensitive credentials and non-sensitive configurations in AWS CloudFormation templates using Secrets Manager and Systems Manager Parameter Store.