Cloudformation stack stuck in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS

1

Our root stack is stuck in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS even after all the nested stacks are in UPDATE_COMPLETE status. None of the resources are in DELELTE_FAILED or any other status except UPDATE_COMPLETE. Now we are stuck with a root stack in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS state, where we cannot even roll back or redeploy the same stack because it throws a deployment already in progress error.

How do we clear our stack from this state, so we can start deploying again? We are using Amplify to build and deploy our stacks. We have gone through all the Q/As and forum posts but none of them have addressed this particular scenario, where we do not have any resources in error state.

Our build process for Amplify usually completes within 45 minutes. Only the backend build usually takes around 10 minutes. The backend build/ push was in progress when the timeout of 45 minutes happened, and this probably left the stachkin that weird state. Doing another deployment afterwards does not work, as it saying deployment is in progress

1 Answer
1

AWS CloudFormation's UPDATE_COMPLETE_CLEANUP_IN_PROGRESS status indicates that CloudFormation is removing resources that it no longer needs because they have been replaced during the stack update process. While this process is usually straightforward, it can occasionally hang due to several reasons.

However, AWS doesn't provide a direct mechanism to cancel or force end a stuck CloudFormation stack operation. You'll typically have to wait until the operation times out or fails due to an error.

Here are a few troubleshooting steps you might want to consider:

  • Check for dependency issues: If you have many nested stacks or resources with dependencies, one might be blocking the cleanup. Check if there are dependencies which are preventing the cleanup process.

  • Check the event log: Open the CloudFormation console and select the stuck stack. Then go to the "Events" tab. There might be useful information about what resource is causing the stack to be stuck.

  • Contact AWS Support: If there's no obvious error or dependency issue and the stack stays in the stuck state for an extended period, your best course of action might be to open a support ticket with AWS. They have deeper visibility into the system and might be able to diagnose the issue.

In any case, you'll want to keep an eye on this situation and engage AWS Support if necessary. I hope this information helps and wish you good luck resolving this issue.

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions