简体   繁体   English

AWS CloudFormation 卡在 DELETED_FAILED 状态

[英]AWS CloudFormation is stuck on DELETED_FAILED status

I have some AWS CloudFormation stacks which are in the status DELETED_FAILED.我有一些处于 DELETED_FAILED 状态的 AWS CloudFormation 堆栈。 There was an issue building these CFTs which caused them to time out originally, and then I attempted to delete them.构建这些 CFT 时出现问题,导致它们最初超时,然后我尝试删除它们。

When contacting AWS support on a separate issue they mentioned there is a way to clear these up.在就单独的问题联系 AWS 支持时,他们提到有一种方法可以解决这些问题。 How can I get remove stacks which are in a DELETED_FAILED status?如何删除处于 DELETED_FAILED 状态的堆栈?

Identify the resources that are attached to the stack and delete them manually from AWS web console. 确定附加到堆栈的资源,然后从AWS Web控制台手动删除它们。 You can find the resources attached to your stack in the cloud formation stack details. 您可以在云形成堆栈详细信息中找到附加到堆栈的资源。 And then you should be able to clear the stack in DELETE_FAILED status. 然后,您应该可以清除处于DELETE_FAILED状态的堆栈。

Hope this helps for you. 希望这对您有所帮助。

Did you check Delete Stack Fails ? 您是否选中了删除堆栈失败

When stacks are in the DELETE_FAILED state because AWS CloudFormation couldn't delete a resource, rerun the deletion with the RetainResources parameter and specify the resource that AWS CloudFormation can't delete. 当堆栈由于AWS CloudFormation无法删除资源而处于DELETE_FAILED状态时,请使用RetainResources参数重新运行删除操作并指定AWS CloudFormation无法删除的资源。 AWS CloudFormation deletes the stack without deleting the retained resource. AWS CloudFormation会删除堆栈,而不删除保留的资源。 Retaining resources is useful when you can't delete a resource, such as an S3 bucket that contains objects that you want to keep, but you still want to delete the stack. 当您无法删除资源(例如包含要保留的对象但仍要删除堆栈的S3存储桶)时,保留资源很有用。 After you delete the stack, you can manually delete retained resources by using their associated AWS service. 删除堆栈后,您可以使用其关联的AWS服务来手动删除保留的资源。

I deleted a pipeline stack but the stacks it had created could not be deleted because the IAM role no longer existed.我删除了一个管道堆栈,但它创建的堆栈无法删除,因为 IAM 角色不再存在。 Things seem to need to be deleted in a certain order.事情似乎需要按照一定的顺序删除。 I redeployed the pipeline and only then was able to delete the stack.我重新部署了管道,然后才能删除堆栈。

在此处输入图片说明

AWS now also gives the option to exclude resources that prevent deletion. AWS 现在还提供了排除阻止删除的资源的选项。

在此处输入图片说明

I am using CDK and deployed a stack, then destroyed it.我正在使用CDK并部署了一个堆栈,然后将其销毁。 I ran into the exact DELETED_FAILED status issue.我遇到了确切的DELETED_FAILED状态问题。

How to fix this status ?如何修复此状态?

Search "CloudFormation" in the search bar.在搜索栏中搜索“CloudFormation”。 Go to Stacks.转到堆栈。

Select the DELETED_FAILED stack and press the delete button.选择 DELETED_FAILED 堆栈并按下删除按钮。

To be really sure all resource have been deleted, if you use cdk如果您使用cdk ,请确保所有资源都已被删除

cdk list

your_stack_name your_stack_name

Then delete this stack然后删除这个堆栈

cdk destroy your_stack_name

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM