Why is my AWS CloudFormation stack stuck in the state CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, UPDATE_ROLLBACK_IN_PROGRESS, or DELETE_IN_PROGRESS?

Last updated: 2020-03-10

My AWS CloudFormation stack is currently stuck in the state CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, UPDATE_ROLLBACK_IN_PROGRESS, or DELETE_IN_PROGRESS.

Resolution

Identify the resource that's stuck

  1. Open the AWS CloudFormation console.
  2. In the navigation pane, choose Stacks, and then select the stack that's in a stuck state.
  3. Choose the Resources tab.
  4. In the Resources section, in the Status column, find the resources in the stack that's started, but hasn't completed, the create, update, or delete process.
    Note: The resources that you're looking for could be in the state CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, or DELETE_IN_PROGRESS.
  5. In the AWS Management Console, inspect your resources for the service that corresponds to your resources.
    Note: The console varies depending on the resource that's stuck. For example, if an Amazon Elastic Container Service (ECS) service is stuck in the create state, then check that resource in the Amazon ECS console.

Check the AWS CloudTrail logs

If the resource doesn’t show any errors in its corresponding console, then you can troubleshoot the issue in the CloudTrail logs. For information on viewing CloudTrail logs, see Viewing Events with CloudTrail Event History.

  1. Open the AWS CloudFormation console.
  2. In the navigation pane, choose Stacks, and then select the stack that's in a stuck state.
  3. Choose the Resources tab.
  4. In the Resources section, in the Status column, find the resources in the stack that's started, but hasn't completed, the create, update, or delete process.
    Note: The resources that you're looking for could be in the state CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, or DELETE_IN_PROGRESS.
  5. Choose the Events tab, and then note the timestamp when AWS CloudFormation initialized the creation of that stuck resource.
  6. Open the CloudTrail console.
  7. In the navigation pane, choose Event history.
  8. For Time range, enter the date and time for the timestamp that you noted in step 5 for the starting time (From). For the ending time (To), enter a date and time that's five minutes past the starting time.
    Note: For example, if AWS CloudFormation initialized the creation of your stuck resource at 9:00 AM on 2020-01-01, then enter 09:00 AM on 2020-01-01 as your starting time and 9:05 AM on 2020-01-01 as your ending time.
  9. Choose Apply.
  10. In the returned list of events, find the API calls that are related to the create or update API call of your resource. For example, you could find ModifyVolume for Amazon Elastic Block Store (Amazon EBS) volume updates.
    Tip: Try waiting a few minutes for the API calls to show up in the CloudTrail logs. API calls don't always appear immediately in the logs.

Get your AWS CloudFormation stack out of the stuck state

In most situations, you must wait for your AWS CloudFormation stack to time out. The timeout length varies, and is based on the individual resource stabilization requirements that AWS CloudFormation waits for to reach the desired state.

You can control stack timeout and use rollback triggers to control the length of time that AWS CloudFormation waits. For more information on rollback triggers, see Use AWS CloudFormation Stack Termination Protection and Rollback Triggers to Maintain Infrastructure Availability.

In some situations, you can bypass the timeout and get your stack unstuck quickly. These situations include custom resources and Amazon ECS services. For more information, see the following:


Did this article help you?

Anything we could improve?


Need more help?