AWSSenior

CloudFormation stuck in UPDATE_ROLLBACK_FAILED (and DELETE_FAILED)

A rollback fails when CloudFormation cannot restore a resource. Fix the cause, then continue the rollback, or skip the resources that cannot be restored.

What you see

  • Stack status UPDATE_ROLLBACK_FAILED
  • Stack status DELETE_FAILED
  • No updates are to be performed

What it means

When an update fails, CloudFormation rolls back. If it cannot return a dependent resource to its old state, the rollback itself fails and the stack is stuck. The docs' example: rolling back to a database instance that someone deleted outside CloudFormation. CloudFormation does not know, so it tries to restore a resource that no longer exists.

Changes made outside CloudFormation are the single most common root cause. After a rollback that skipped resources, the real state no longer matches the template.

How to confirm the cause

  1. 1
    Find the failing resource and its reason
    aws cloudformation describe-stack-events --stack-name STACK_NAME --max-items 20

    Read ResourceStatusReason on the first FAILED event. In the console, use the operation ID filter.

  2. 2
    Check whether someone changed resources by hand
    aws cloudformation detect-stack-drift --stack-name STACK_NAME

    Drift detection compares the real resources with the template.

Causes and fixes

  • A resource was changed or deleted outside CloudFormation

    HOW TO TELL
    The failing event says a resource does not exist or does not match.
    ROOT CAUSE
    CloudFormation assumes the resource is as it left it. When it is not, restoring the old version is impossible.
    FIX
    Bring the resource back to match the original template (for a deleted one, recreate it with the same name and properties), then continue the rollback.
  • Insufficient permissions

    HOW TO TELL
    The reason is an access denied on a modify action.
    ROOT CAUSE
    Your policy lets you create a resource but not modify it, so the rollback cannot change it back.
    FIX
    Add the missing permissions, then continue the rollback.
  • Quota, expired credentials or a resource that did not stabilize

    HOW TO TELL
    The reason says limit exceeded, invalid security token, or timeout.
    ROOT CAUSE
    These are temporary or fixable without changing the stack.
    FIX
    Delete unneeded resources or request a quota increase. For a token or timeout, no change is needed; continue the rollback.
  • Nothing else works

    HOW TO TELL
    You cannot fix the resource.
    ROOT CAUSE
    The resource cannot be restored.
    FIX
    Continue the rollback while skipping it. CloudFormation marks it UPDATE_COMPLETE, but the real state will not match the template, so reconcile it before the next update.
    aws cloudformation continue-update-rollback --stack-name STACK_NAME --resources-to-skip LOGICAL_RESOURCE_ID
  • DELETE_FAILED: resource is not empty or protected

    HOW TO TELL
    Stack is DELETE_FAILED.
    ROOT CAUSE
    Some resources must be empty first, such as an S3 bucket with objects. Termination protection also blocks deletion.
    FIX
    Empty the resource, disable termination protection, or retry the delete while retaining the resource that cannot be deleted.
    aws cloudformation delete-stack --stack-name STACK_NAME --retain-resources LOGICAL_RESOURCE_ID

How to stop it coming back

  • Never edit CloudFormation-managed resources by hand. Change the template.
  • Run drift detection on a schedule.
  • Use change sets and review them before applying.

Keep going

Sources

AWS documentation (docs.aws.amazon.com), read 18 Nov 2026.

Search

Search cheat sheets and projects