CloudFormation troubleshooting starts with the Events tab: sort it by timestamp, scroll to the first line marked CREATE_FAILED, UPDATE_FAILED or DELETE_FAILED, and read the "Status reason" text. That single message names the resource, the AWS service that rejected it, and usually the exact cause (a duplicate name, a missing permission, an invalid Availability Zone). Fix that root cause rather than the cascade of failures that followed it, and most stuck deployments resolve quickly. Nothing needs to be installed first: the CloudFormation console and the AWS CLI are enough, and the CLI is what you want for anything involving deletion problems.
What You'll Need
- Access to the AWS account and Region where the stack lives, with permission to view CloudFormation, CloudTrail and the services in the template (EC2, IAM, S3, VPC and so on).
- The AWS CLI configured with credentials, version 2 preferred, for describe-stack-events and delete-stack commands.
- The template file itself, ideally in version control, so you can compare it against what the stack actually deployed.
- Read access to CloudTrail event history and, for lambda-backed custom resources, access to that function's CloudWatch Logs.
- A separate sandbox stack or account where possible, so retries do not disturb production resources.
Step-by-Step
- Open the stack and go to the Events tab. In the CloudFormation console, select the stack and choose Events. Labels in the console can differ slightly by version and Region, but the tab itself is always named Events. Sort ascending by timestamp so the earliest failure appears first.
- Find the first failure, not the loudest one. Many resources will show failures after the root one, especially resources that depend on a rejected VPC or role. Read the topmost failed event and its Status reason. Ignore everything below it until that one is fixed.
- Use the CLI when you need the full story. Run
aws cloudformation describe-stack-events --stack-name YOUR-STACK --query "StackEvents[?contains(ResourceStatus,'FAILED')].{Time:Timestamp,Logical:LogicalResourceId,Reason:ResourceStatusReason}" --output table. This prints every failure with its reason and avoids clicking through pages in the console. - Match the failed logical ID to the template. The event gives a logical ID such as
WebServerInstance, not the physical resource name. Search your template for that identifier, then look at the properties being passed. Common culprits are a hard-coded name that already exists, a SubnetId from the wrong VPC, or an AMI ID that does not exist in that Region. - Check credentials and permissions before blaming the template. An
AccessDeniedoris not authorized to performreason means the IAM principal running the stack lacks an action. Open CloudTrail event history, filter by the error code, and look at the denied API call. For roles the stack creates itself, check for circular dependencies between IAM policies and the resources they grant access to. - Investigate resource-specific errors in the service's own console. CloudFormation only relays what the underlying service said. For an EC2 launch failure, check the instance's status reason or the Auto Scaling activity history. For a load balancer health check failure, check the target group. For a failed ECS service, check the service events. The service console often adds detail CloudFormation truncates.
- Read CloudWatch Logs for custom resources and Lambda-backed steps. If the failure comes from a custom resource, open the Lambda function it points to and read the latest log stream. Timeouts and unhandled exceptions appear there with the real error message that CloudFormation reports only as "Received response status FAILED".
- Validate the template before retrying. Run
aws cloudformation validate-template --template-body file://template.yamlfor syntax, and use the console's change set preview to see what will actually be created or replaced. A change set catches unintended resource replacements that a plain update would perform silently. - Retry with rollback disabled only when you understand the cost. For a create that failed, you can relaunch with rollback disabled so the stack stays in a failed-but-inspectable state instead of deleting everything. That keeps partially created resources you can examine, but you must clean them up yourself. In the console this is the "Disable rollback" option on the create page; in the CLI it is
--disable-rollbackoncreate-stack. - For a failed update, choose continue or roll back deliberately. When an update fails, CloudFormation either rolls back to the previous configuration or holds in UPDATE_ROLLBACK_FAILED. From there, run
aws cloudformation continue-update-rollback --stack-name YOUR-STACKafter fixing the resource that blocked rollback, optionally skipping specific resources with--resources-to-skip. - For a failed delete, find what is holding the resource. A stack stuck in DELETE_FAILED usually has a non-empty S3 bucket, a security group still attached to an instance, or a resource modified outside CloudFormation. Empty the bucket or detach the dependency by hand, then retry the delete, optionally skipping the stubborn logical ID with
--retain-resourcesand deleting that resource manually afterwards. - Delete rollback-complete stacks that serve no purpose. A stack in ROLLBACK_COMPLETE cannot be updated, only deleted. Confirm nothing you need remains inside it, then delete it and redeploy. Deletion removes the stack record and any resources CloudFormation still tracks, so check for anything created outside the template first.
Common Mistakes
- Fixing the last error in the list instead of the first. The later failures are usually knock-on effects of one rejected resource.
- Editing resources in the console after CloudFormation created them. Manual changes cause drift and often make the next update fail or trigger an unexpected replacement.
- Hard-coding physical names (bucket names, IAM role names, DB identifiers) that must be unique. Deploying the same template twice in one account fails on the duplicate. Prefer generated names and reference resources by logical ID.
- Assuming a failed stack means nothing was created. With rollback enabled, CloudFormation deletes what it made, but resources created outside the template, or retained by a DeletionPolicy, survive.
- Retrying an identical template after an access error. If permissions or a quota blocked it once, they will block it again until something changes.
- Ignoring service quotas. Exceeding an EC2 or VPC limit shows up as a resource failure with a quota message, not as a CloudFormation problem.
Tips
- Deploy with change sets for every update so replacements are visible before they happen.
- Keep templates in Git and diff the deployed version against the working copy when behaviour seems to have changed without reason.
- Use stack policies to protect stateful resources from accidental replacement during updates.
- Tag stacks with owner and environment so problem stacks are easy to find later.
- Run non-production stacks first in the same Region, since Availability Zone names and AMI IDs differ between Regions.
- Enable termination protection on stacks whose deletion would be costly.
Troubleshooting
The reason text is generic ("Resource creation cancelled"). A dependency failed before this resource started. Walk upward through the events to the earliest failure and fix that one.
Errors mention a resource that is not in your template. Nested stacks are involved. Open the parent stack's Resources tab, select the nested stack, and read its own Events tab; the failure lives there, and the reason field on the parent carries a link.
Updates fail on a resource you did not touch. Check for drift by running aws cloudformation detect-stack-drift --stack-name YOUR-STACK and then describe-stack-resource-drifts. Manual console edits are the usual cause, and reconciling them is normally the fix.
The stack is stuck for a long time with no new events. Some resources take a while to time out, but a stack in progress for far longer than expected often means a custom resource is waiting on a callback. Check the Lambda logs and confirm the function is sending a response signal.
Deletion never progresses. Look for a resource in DELETE_IN_PROGRESS that depends on another service: an ENI attached to a load balancer, a bucket with objects, a KMS key still in use. Resolve the dependency in the service console, then retry.
If that did not work, reproduce the failure in a minimal template containing only the failing resource and its dependencies. A stripped-down copy usually exposes the real error in seconds, and it is safe to iterate on without touching production.
Frequently Asked Questions
Why does my stack fail even though the template validates?
Validation only checks syntax and structure. It cannot verify that an AMI exists in your Region, that a name is free, that a subnet belongs to the right VPC, or that your credentials can perform the actions. Those surface as runtime failures in the Events tab.
How long do I have to fix a rolled-back stack?
There is no deadline; a rolled-back stack simply sits in its terminal state until you act. A stack in ROLLBACK_COMPLETE must be deleted before you can update it, so fix the template, delete the old stack once you are sure nothing must be kept, and redeploy.
Can I recover a stack stuck in UPDATE_ROLLBACK_FAILED?
Yes, in most cases. Fix the underlying problem, then run continue-update-rollback. If one resource still blocks it, skip that resource during the rollback and repair or delete it manually afterwards.
What is the difference between DELETE_FAILED and ROLLBACK_COMPLETE?
DELETE_FAILED means CloudFormation tried to remove the stack and could not delete at least one resource, usually because something outside the stack still depends on it. ROLLBACK_COMPLETE means a create failed and the partial resources were successfully removed.
Does CloudFormation tell me which permission is missing?
Sometimes, in the status reason. When it does not, CloudTrail event history records the denied API call with the exact action and resource, which is the fastest way to identify the missing permission.
Will troubleshooting ever delete my data?
It can if you delete a stack containing stateful resources such as databases or buckets with objects. Check for DeletionPolicy retain settings and take a backup before deleting any stack you are not certain about.