Why is my CloudFormation stack stuck in an IN_PROGRESS state?

Last updated: 2022-05-05

My AWS CloudFormation stack is currently stuck in one of the following states:

  • CREATE_IN_PROGRESS
  • UPDATE_IN_PROGRESS
  • UPDATE_ROLLBACK_IN_PROGRESS
  • DELETE_IN_PROGRESS

How do I fix this?

Resolution

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

You can control stack timeout and use rollback triggers to control the length of time that CloudFormation waits. For more information on rollback triggers, see Use AWS CloudFormation stack termination protection and rollback triggers to maintain infrastructure availability.

You can bypass the timeout for some custom resources and Amazon Elastic Container Service (Amazon ECS) resources. To verify which resource is stuck and determine if you must wait or if you can bypass the timeout, do the following:

Identify the stuck resource

  1. Open the 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 yet completed, the create, update, or delete process.
    Note: The resources that you're looking for might 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 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 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 yet 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 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 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.

Bypass the timeout for custom resources and Amazon ECS services

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?


Do you need billing or technical support?