A developer is deploying a three-tier web application using an AWS CloudFormation template. The template defines an Amazon RDS DB instance that requires database credentials. The company's security policy requires that database passwords must be stored securely, rotated every 30 days, and retrieved dynamically during stack operations. Additionally, the developer must ensure that any failed stack updates automatically revert to the last stable state without leaving orphaned resources or requiring manual intervention. Which two actions should the developer take to meet these security and deployment requirements? (Select TWO.)
- Store the database password in AWS Secrets Manager and reference it in the CloudFormation template using a dynamic reference format.Cevap
- Rely on CloudFormation's automatic rollback on update failure, which reverts modified resources to their previous configuration and returns the stack to the UPDATE_ROLLBACK_COMPLETE state.Cevap
- CStore the database password in Systems Manager Parameter Store as a standard String parameter and use the Ref intrinsic function to retrieve the password.
- DIf a stack update fails and enters the UPDATE_ROLLBACK_FAILED state, immediately execute another update stack command with a corrected template to clear the status.
- EManually delete the resources that failed to update using the AWS Management Console to force the stack to bypass the rollback phase.
Cevap
Store the database password in AWS Secrets Manager and reference it in the CloudFormation template using a dynamic reference format, and rely on CloudFormation's automatic rollback on update failure, which reverts modified resources to their previous configuration and returns the stack to the UPDATE_ROLLBACK_COMPLETE state.
Storing database credentials in AWS Secrets Manager and referencing them using dynamic references satisfies the credential security and 30-day rotation policy while keeping passwords out of plaintext template properties. Relying on default CloudFormation update rollbacks ensures that stack updates that fail revert all affected resources back to their original stable configurations automatically.
Adım Adım Çözüm
Anahtar Kavram
AWS CloudFormation deployment lifecycle controls stack update rollbacks and integrates with AWS Secrets Manager via dynamic references to handle rotated secrets securely.
Tahmini Süre:2m 0s