A stack is stuck in `UPDATE_ROLLBACK_FAILED`.
AdvancedTroubleshootingCloudFormation, CloudWatch, KMS, Secrets and Cost
Answer
Likely causes → During rollback, CloudFormation could not return a resource to its old state. Typical reasons: the resource was changed or deleted outside CloudFormation, a dependency is gone, or permissions were removed.
Diagnose →
aws cloudformation describe-stack-events --stack-name app \
--query "StackEvents[?contains(ResourceStatus,'FAILED')].[Timestamp,LogicalResourceId,ResourceStatusReason]" --max-items 10
Fix →
- Fix the underlying issue if you can (re-create the deleted dependency, restore permissions)
- Run
aws cloudformation continue-update-rollback --stack-name app - If a resource cannot be recovered, skip it:
aws cloudformation continue-update-rollback --stack-name app --resources-to-skip MyBrokenResource. Then reconcile that resource manually, because CloudFormation now treats it as matching the old template
Prevent → Never change stack resources by hand. Use stack policies and drift detection, and deploy through change sets.
More on CloudFormation, CloudWatch, KMS, Secrets and Cost
Updating a stack fails: `Stack:arn:aws:cloudformation:...:stack/app/... is in ROLLBACK_COMPLETE state and can not be updated.`BeginnerA pipeline fails with `An error occurred (ValidationError) when calling the UpdateStack operation: No updates are to be performed.`Beginner`InsufficientCapabilitiesException: Requires capabilities : [CAPABILITY_NAMED_IAM]`.BeginnerStack deletion ends in `DELETE_FAILED` with `The bucket you tried to delete is not empty` on an S3 bucket resource.IntermediateDrift detection shows `MODIFIED` on a security group and an RDS instance that someone changed in the console. How do you reconcile?AdvancedDeleting or updating a stack fails: `Export network-VpcId cannot be deleted as it is in use by app-stack`.Intermediate