简体   繁体   English

AWS 云形成删除失败

[英]AWS cloud formation delete failed

How can I force delete my AWS cloud formation stack?如何强制删除我的 AWS 云形成堆栈? The tied resources were already deleted previously like the DNS, route53, etc. Whenever I delete the stack, it failed because it couldn't find the resources.绑定的资源之前已经被删除,例如 DNS、route53 等。每当我删除堆栈时,它都会因为找不到资源而失败。

The specified hosted zone does not exist. DELETE_FAILED.

This made the deletion halt and made the stack still active.这使删除停止并使堆栈仍然处于活动状态。 How can I force clean-up and remove this stack?如何强制清理并删除此堆栈?

Based on this thread, it appears that stack deletion can be problematic if the stack is altered. 基于这个线程,如果堆栈被更改,似乎堆栈删除可能会有问题。

https://forums.aws.amazon.com/thread.jspa?threadID=71050&start=0&tstart=0 https://forums.aws.amazon.com/thread.jspa?threadID=71050&start=0&tstart=0

Looks like you need to go via Support to get it deleted. 看起来您需要通过支持将其删除。

That said, I have been able to delete stacks where I have manually altered the components. 也就是说,我已经能够删除我手动更改组件的堆栈。 Sometimes you need to wait a couple of hours after you terminate instances, VPCs, subnets etc before the stack deletion actually succeeds. 在堆栈删除实际成功之前,有时您需要等待几个小时后终止实例,VPC,子网等。

It seems the Route53 records were either deleted manually before cloudformation or there was some failure within cloudformation after it deleted the record. 似乎Route53记录在cloudformation之前被手动删除,或者在删除记录之后在cloudformation中有一些失败。 Its stuck because it can't find the hosted zone because it was already deleted if indeed this is what was described in your post. 它被卡住了,因为它无法找到托管区域,因为它已被删除,如果确实这是您的帖子中描述的内容。 You can try to update the stack with the original script and then delete the stack via cloudformation without any manual intervention. 您可以尝试使用原始脚本更新堆栈,然后通过cloudformation删除堆栈,无需任何手动干预。

AWS Cloud formation stack does not get deleted until all dependency resources either used in other stack or busy with non stack resources. 在所有依赖关系资源用于其他堆栈或忙于非堆栈资源之前,AWS Cloud形成堆栈不会被删除。 So better see which resource is shared some where else and try to release that. 因此,更好地了解哪些资源在其他地方共享,并尝试释放它。 hope that help. 希望有所帮助。

Check your IAM role and the policy, review the privileges that you have associated with the role, so that if there is any permission issue, that should resolve the issue.检查您的 IAM 角色和策略,查看您与该角色关联的权限,以便如果存在任何权限问题,应该可以解决问题。 Refer: https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-stack-delete-failed/参考: https : //aws.amazon.com/premiumsupport/knowledge-center/cloudformation-stack-delete-failed/

Need to check the reason for failure in stack details需要在stack details中检查失败的原因

Either delete this manually, or retain those resources while eleteing要么手动删除它,要么在删除时保留这些资源

eg: $ aws cloudformation delete-stack --stack-name my-stack --retain-resources myresource1 myresource2例如:$ aws cloudformation delete-stack --stack-name my-stack --retain-resources myresource1 myresource2

在此处输入图像描述

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

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