Question: Why is my CloudFormation stack stuck in an IN_PROGRESS state?

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

Short descriptionIn 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.

ResolutionIdentify the stuck resource1.    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, update, or delete process.Note: These resources 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 Elastic Container Service (Amazon ECS) service is stuck in the create state, then check that resource in the Amazon ECS console.Check the AWS CloudTrail logsIf the resource doesn’t show any errors in its corresponding console, then use AWS CloudTrail logs to troubleshoot the issue. 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, refer to the Status column. Find any resources that are stuck in the create, update, or delete process.Note: These resources might 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, suppose that CloudFormation initialized the creation of your stuck resource at 9:00 AM on 2020-01-01. In this case, 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 timeoutThere are multiple reasons why a stack can become stuck. Therefore, the resolution varies depending on the resource that's stuck. In some cases, you can bypass the timeout to quickly resolve your stack's status. For example, you might be able to bypass the timeout for custom resources and Amazon ECS services. See the following resources for more information:How can I stop my Amazon ECS service from failing to stabilize in AWS CloudFormation?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 stack operations:CREATE_IN_PROGRESS: Delete the stack to stop the creation process.UPDATE_IN_PROGRESS: Cancel the stack update.Note: To understand the root cause of the issue and avoid it in future deployments, refer to the Troubleshooting CloudFormation guide.