[英]Can I use existing AWS IAM role to create S3 bucket via Cloudformation template?
[英]How can I create IAM Role Dropdown in Cloudformation Template Parameters
我正在寻找一种方法来列出Cloudformation模板中现有的IAM角色,其方式与列出EC2密钥对相似。 下面是我正在尝试使用EC2密钥对和IAM角色的示例,但是Cloudformation会抛出错误,指出“RoleName”不存在。
"KeyName": {
"Description" : "Choose a Key Pair that is available in this region",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription": "Must be the name of an existing EC2 Key Pair"
},
"ServiceRole": {
"Description" : "Choose an IAM Role that is available in this region",
"Type": "AWS::IAM::Role::RoleName",
"ConstraintDescription": "Must be the name of an existing IAM Role"
},
Cloudformation Interface的屏幕截图如果有可能实现这个想法吗?
下拉列表中并不支持所有类型,并且IAM角色不是受支持的类型。 因此,您无法获得IAM角色的下拉列表。 相反,您将不得不使用一个简单的文本框。
以下是支持的参数类型的当前列表:
String
Number
List<Number>
CommaDelimitedList
AWS::EC2::AvailabilityZone::Name
AWS::EC2::Image::Id
AWS::EC2::Instance::Id
AWS::EC2::KeyPair::KeyName
AWS::EC2::SecurityGroup::GroupName
AWS::EC2::SecurityGroup::Id
AWS::EC2::Subnet::Id
AWS::EC2::Volume::Id
AWS::EC2::VPC::Id
AWS::Route53::HostedZone::Id
List<AWS::EC2::AvailabilityZone::Name>
List<AWS::EC2::Image::Id>
List<AWS::EC2::Instance::Id>
List<AWS::EC2::SecurityGroup::GroupName>
List<AWS::EC2::SecurityGroup::Id>
List<AWS::EC2::Subnet::Id>
List<AWS::EC2::Volume::Id>
List<AWS::EC2::VPC::Id>
List<AWS::Route53::HostedZone::Id>
资料来源: http : //docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.