'Stack is in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS state and can not be updated

I'm trying to deploy a Lambda function inside Cloud9, but it is failing.

When I right-click on the function and click Deploy, I get Application deployment failed, and then a popup:

AWS CloudFormation Deployment Errors
Stack:arn:aws:cloudformation:* is in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS state and cannot be updated.


Solution 1:[1]

Cloudformation throws this error when part, or a sub-stack, of the CloudFormation template, could not be updated or rolled back properly. This can happen if something modified the portion in question outside of what the template says. Here is an excerpt from the docs regarding this issue:

A nested stack might fail to roll back because of changes that were made outside of AWS CloudFormation when the stack template doesn't accurately reflect the state of the stack. A nested stack might also fail if an Auto Scaling group in a nested stack had an insufficient resource signal timeout period when the group was created or updated.

Please read Troubleshooting AWS CloudFormation to find more information about your issue.

Solution 2:[2]

If your deployment is building another Stack in CloudFormation, you may want to check for existing ones with the same name that may be conflicting with the Stack created by your deployment.

Go to CloudFormation, find the conflicting Stack, delete all resources (in that stack), and finally delete the stack.

Deploy again and it should work this time.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 John Rotenstein
Solution 2 chris