可以删除由AWS CDK引导创建的所有资源吗?

huangapple go评论60阅读模式
英文:

Is it possible to delete all the resources created by AWS CDK bootstrapping?

问题

我正在使用AWS CDK玩耍,现在我想清理所有内容。

是否可以使用CDK命令删除由cdk bootstrap创建的所有资源(桶、角色等等...)?

我应该手动执行吗?在这种情况下,是否有一种方法可以知道CDK引导过程确切创建了哪些资源?

英文:

I was playing with AWS CDK and now I want to clean it all.

Is it possible to delete all the resources (bucket, roles, whatever...) created by cdk bootstrap using a CDK command?

Should I do it manually? In this case, is there a way to know what exact resources CDK bootstrapping process did create?

答案1

得分: 2

Bootstrapping只是部署一个Cloudformation堆栈 - 删除资源需要删除这个堆栈。默认情况下称为CDKToolkit

在清空后,您需要手动删除S3 Asset存储桶。

添加一个用于销毁引导堆栈的CDK CLI命令的功能请求正在此处跟踪:https://github.com/aws/aws-cdk/issues/986

英文:

Bootstrapping just deploys a Cloudformation stack - deleting the resources requires you to delete this stack. It's called CDKToolkit by default.

You will need to manually remove the S3 Asset bucket after emptying it, though.

The feature request to add a CDK CLI command for destroying the bootstrap stack is being tracked here: https://github.com/aws/aws-cdk/issues/986

huangapple
  • 本文由 发表于 2023年5月10日 21:42:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76219173.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定