aws-cloudformation - 如何根据AWS Cloud-formation中的资源名称获取堆栈详细信息

标签 aws-cloudformation boto3

有什么方法可以从创建的资源中找到堆栈名称吗? 假设我有 cft 模板,它创建堆栈 A 和资源 B。 然后由于需求,我必须为同一个资源B创建另一个堆栈C。

但是堆栈C的创建不允许我创建资源B,因为堆栈A已经锁定了它。 所以,我的目的是找到资源B所拥有的较早的堆栈并删除堆栈A。 然后,用CFT实现Stack B,然后创建资源B。

我正在尝试使用 boto3。

最佳答案

In addition to any tags you define, AWS CloudFormation automatically creates the following stack-level tags with the prefix aws::

aws:cloudformation:logical-id

aws:cloudformation:stack-id

aws:cloudformation:stack-name

The aws: prefix is reserved for AWS use

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html

关于aws-cloudformation - 如何根据AWS Cloud-formation中的资源名称获取堆栈详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63961230/

相关文章:

amazon-web-services - 如何在 cloudformation 脚本的输出部分引用记录集名称?

python - 将 Dataframe 保存到 csv 直接保存到 s3 Python

python - 如何使用当前版本的 boto3 运行 AWS Glue Python Spark 作业?

python - 将文件上传到 s3 存储桶时遇到 boto3 问题

amazon-web-services - 无效的数据库实例类 : db. t2.micro

aws-cloudformation - 具有复杂列类型的 Athena (Presto) View

windows - 如何在 AWS Windows 实例的 CloudFormation 脚本中将 DeleteOnTermination 设置为 true?

amazon-web-services - Codecommit 跨账户访问

python - RDS : Not able to fetch events it is showing blank in boto3 describe_events

amazon-web-services - 使用 Boto3 标记 EIP