A developer attempts to create a new AWS CloudFormation stack. The stack creation fails due to a resource configuration error, and the stack status transitions to ROLLBACK_COMPLETE. After correcting the error in the template, the developer attempts to update the stack with the corrected template, but the operation fails. Which of the following actions must the developer take to successfully deploy the resources?
- Delete the failed stack and create a new stack using the corrected template.Cevap
- BRun drift detection on the stack and resolve any out-of-band changes before retrying the update.
- CModify the IAM trust policy of the CloudFormation role to allow the stack to transition out of the rollback state.
- DAdd a buildspec.yml file to the root directory containing instructions for the rollback phase.
Cevap
Delete the failed stack and create a new stack using the corrected template.
When the initial creation of a CloudFormation stack fails, the stack rolls back and enters the ROLLBACK_COMPLETE state. A stack in this state cannot be updated or recovered. The only way to deploy the resources with a corrected template is to delete the failed stack and create a new one.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation Rollback States and Stack Lifecycle
Tahmini Süre:45s