Skip to content

Why is my CloudFormation stack stuck in an IN_PROGRESS state?

3 minute read
1

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

Short description

In most situations, you must wait for your CloudFormation stack to time out. The timeout length 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.

Resolution

Identify the stuck resource

Complete the following steps:

  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, refer to the Status column. Find the resources that are stuck in CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, or DELETE_IN_PROGRESS state.
  5. In the AWS Management Console, check your resources for the service that corresponds to your resources.
    Note: For example, if an Amazon Elastic Container Service (Amazon ECS) service is stuck in the create state, then check that resource in the Amazon ECS console.

If the resource doesn't show any errors in its corresponding console, then use AWS CloudTrail logs to troubleshoot the issue. For information on CloudTrail logs, see Viewing events with CloudTrail Event history.

Check the CloudTrail logs

Complete the following steps:

  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, refer to the Status column. Find any resources that are stuck in the CREATE_IN_PROGRESS, UPDATE_IN_PROGRESS, or DELETE_IN_PROGRESS state.
  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 5 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 can find ModifyVolume for Amazon Elastic Block Store (Amazon EBS) volume updates.
    Tip: Wait 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

You might be able to bypass the timeout to resolve your stack's status. For more information, see How can I stop my Amazon ECS service from failing to stabilize in AWS CloudFormation? and How do I delete a Lambda-backed custom resource that's stuck in DELETE_FAILED status or DELETE_IN_PROGRESS status in CloudFormation?

If the stack is stuck in the CREATE_IN_PROGRESS or UPDATE_IN_PROGRESS state, then you can stop the progress using the following stack operations:

Note: To understand the root cause of the issue, see Troubleshooting CloudFormation.