A developer is designing an AWS CloudFormation template to deploy an application that connects to an Amazon RDS database. The developer needs to store the database credentials securely and prevent the database from being accidentally deleted if the CloudFormation stack is deleted or updated. Which combination of actions should the developer take to meet these requirements? (Select TWO.)
- Store the database credentials in AWS Secrets Manager and retrieve them in the template using dynamic references.Cevap
- Configure the DeletionPolicy attribute with a value of Retain on the database resource in the template.Cevap
- CStore the database credentials in AWS Systems Manager Parameter Store as a standard String parameter type to optimize costs.
- DManually update the database password directly in the Amazon RDS console after the stack deployment is complete.
- ETrigger a stack update to apply the deletion policy while the stack is currently in the UPDATE_ROLLBACK_IN_PROGRESS state.
Cevap
To securely manage the credentials and protect the database, the developer should store the database credentials in AWS Secrets Manager and retrieve them using dynamic references, and also configure the DeletionPolicy attribute with a value of Retain on the RDS database resource in the template.
Storing credentials in AWS Secrets Manager and referencing them using dynamic references keeps sensitive values encrypted and out of the template code. Setting the DeletionPolicy to Retain on the RDS resource prevents CloudFormation from deleting the database when the stack is deleted or the resource is updated out of the stack.
Adım Adım Çözüm
Anahtar Kavram
AWS CloudFormation Resource Lifecycle and Credential Management