小编Ada*_*ott的帖子

如何在Cloudformation模板参数中创建IAM角色下拉列表

我正在寻找一种方法来列出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"
},
Run Code Online (Sandbox Code Playgroud)

Cloudformation Interface的屏幕截图 如果有可能实现这个想法吗?

amazon-web-services aws-cloudformation

3
推荐指数
1
解决办法
1847
查看次数