【发布时间】:2016-08-08 02:44:46
【问题描述】:
我正在尝试使用 cloudFormation 创建一个 IAM 角色。我想在角色名称中包含一个参数。我的 cloudformation 脚本有以下内容:
"Resources" : {
"TestRole" : {
"Type" : "AWS::IAM::Role",
"Properties" : {
"AssumeRolePolicyDocument": {
"Version" : "2012-10-17",
"Statement": [ {
"Effect": "Allow",
"Principal": {
"Service": [ "ec2.amazonaws.com" ]
},
"Action": [ "sts:AssumeRole" ]
}]
}
}
}
}
我的 cloudformation 堆栈名为角色测试。这将创建一个名为 role-test-TestRole-RandomString 的 IAM 角色。有没有办法让角色名与我在参数中指定的完全一致?
【问题讨论】:
标签: amazon-web-services amazon-cloudformation