I have several cloudformation templates with custom resources based on several AWS Step Functions state machines.
Sometimes, during development tasks, they are falling into an infinite loop when I was trying to delete the cloudformation stacks, so the delete operation is stuck into DELETE_IN_PROGRESS
.
Although I can abort execution of the state machines, cloudformation remains stuck for one hour until the DELETE
operation fails.
I cannot find nothing that can help in the official documentation about how cloudformation handles this use case, it seems that the only way to go is wait for an hour until cloudformation states at DELETE_FAILED
.
Anybody knows anyway to avoid waiting when a state machine execution is aborted?
I don't think the problem is in aborting State Machine executions. Most probably your custom resources do not proccess CF DELETE events correctly. So actually you're most probably not actually waiting when a state machine execution is aborted.
To accelerate things consider setting a smaller timeout in Stack creation options when you create the stack.