首页 > 解决方案 > Troposhere 循环创建 EC2 实例

问题描述

我想在我的 cloudformation 模板 (YAML) 中创建可变数量的 EC2 实例。我计划为 EC2 实例创建和循环创建一个堆栈。我读到这是可以使用对流层实现的。有人可以帮我提供模板或示例吗?

标签: amazon-ec2amazon-cloudformationtroposphere

解决方案


将以下内容写入一个可以为每个实例重用的类。

https://github.com/cloudtools/troposphere/blob/master/examples/EC2InstanceSample.py


推荐阅读