【发布时间】:2020-11-27 10:45:42
【问题描述】:
需要帮助!我正在尝试使用 boto3 部署 CloudFormation 堆栈。在 cloudformation 模板中,为 Outputs 参数提供以下代码。当我运行 describe_stack 时,它会显示堆栈的完整描述和所有属性。如何从下面的 OutputKeys 中只获取其中的一些?例如,如果我只想要 PublicDNS 或 PublicIP 怎么办?
Outputs:
InstanceId:
Description: InstanceId of the newly created EC2 instance
Value: !Ref EC2Instance
AZ:
Description: Availability Zone of the newly created EC2 instance
Value: !GetAtt
- EC2Instance
- AvailabilityZone
PublicDNS:
Description: Public DNSName of the newly created EC2 instance
Value: !GetAtt
- EC2Instance
- PublicDnsName
PublicIP:
Description: Public IP address of the newly created EC2 instance
Value: !GetAtt
- EC2Instance
- PublicIp
【问题讨论】:
标签: python amazon-cloudformation boto3