A developer is attempting to deploy a new application stack using AWS CloudFormation for the first time. The stack creation fails during the creation of an Amazon S3 bucket due to a naming conflict, and the stack status changes to ROLLBACK_COMPLETE. Which two actions should the developer take to successfully deploy the stack with the corrected S3 bucket name?
- Delete the CloudFormation stack that is in the ROLLBACK_COMPLETE state.Cevap
- Update the bucket name in the CloudFormation template to a unique value and create a new stack.Cevap
- CPerform a stack update directly on the existing ROLLBACK_COMPLETE stack using the corrected template.
- DModify the trust policy of the CloudFormation service role to allow the s3:CreateBucket action.
- ERun drift detection on the ROLLBACK_COMPLETE stack to import the conflicting bucket name.
Cevap
To resolve the issue, delete the failed stack in the ROLLBACK_COMPLETE state, update the bucket name in the CloudFormation template to a globally unique value, and create a new stack.
When a CloudFormation stack fails initial creation and enters the ROLLBACK_COMPLETE status, it cannot be updated. The developer must delete the failed stack. To resolve the root cause, which is a naming conflict for the S3 bucket (S3 requires globally unique bucket names across all AWS accounts), the developer must modify the bucket name in the template to be unique and create a new stack.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation initial stack creation failure recovery and S3 naming requirements.
Tahmini Süre:1m 0s