A developer manages an AWS CloudFormation stack for a production application. The stack defines an Amazon S3 bucket with the `DeletionPolicy` attribute set to `Retain`. To update the application's storage architecture, the developer modifies the CloudFormation template to change the name of the S3 bucket, which requires resource replacement. Before executing the stack update, the developer manually deletes the original S3 bucket out-of-band using the AWS CLI. During the stack update, a name collision error occurs for the new S3 bucket, causing the update to fail and begin rolling back. The rollback fails because the original S3 bucket no longer exists, and the parent stack becomes stuck in the `UPDATE_ROLLBACK_FAILED` state.
Which sequence of actions must the developer take to resolve this failure and successfully complete the name change?
- AManually delete the parent stack to clean up the failed resources. Recreate the stack from scratch using the new template containing the unique bucket name, and copy the application data to the new S3 bucket.
- BEnable drift detection on the stack to automatically synchronize the physical state of the deleted S3 bucket with the template definition. Once the drift status is marked as synchronized, trigger a stack update using the new template containing the unique bucket name.
- Invoke the `ContinueUpdateRollback` action and select the original S3 bucket as a resource to skip. Once the stack returns to a stable state, update the template to use a globally unique name for the new S3 bucket, and then run the stack update again.Answer
- DConvert the S3 bucket name parameter to a dynamic reference pointing to an AWS Secrets Manager secret. Update the secret value with the new bucket name, and run the update operation to automatically bypass the rollback lock.