【发布时间】:2017-03-16 11:46:50
【问题描述】:
我创建了一个服务目录产品组合和产品,旨在允许用户启动他们自己的质量保证环境。我为一些用户提供了 AWS 托管策略“ServiceCatalogEndUserFullAccess”(如下),以便他们可以启动产品,但是他们似乎还需要对模板创建的资源(在本例中,只是一个 EC2 和 ELB)的单独权限。
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"catalog-user:*",
"cloudformation:CreateStack",
"cloudformation:DeleteStack",
"cloudformation:DescribeStackEvents",
"cloudformation:DescribeStacks",
"cloudformation:GetTemplateSummary",
"cloudformation:SetStackPolicy",
"cloudformation:ValidateTemplate",
"cloudformation:UpdateStack",
"servicecatalog:DescribeProduct",
"servicecatalog:DescribeProductView",
"servicecatalog:DescribeProvisioningParameters",
"servicecatalog:ListLaunchPaths",
"servicecatalog:ProvisionProduct",
"servicecatalog:SearchProducts",
"s3:GetObject"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"servicecatalog:DescribeRecord",
"servicecatalog:ListRecordHistory",
"servicecatalog:ScanProvisionedProducts",
"servicecatalog:TerminateProvisionedProduct",
"servicecatalog:UpdateProvisionedProduct"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"servicecatalog:userLevel": "self"
}
}
}
]
}
因此,模板在 CloudFormation 中失败并回滚并出现如下错误:
API:ec2:runInstances - You are not authorized to perform this operation.
理想情况下,我想限制用户仅从服务目录启动 EC2 的能力,或者更具体地说,可能是我们的暂存 VPC,但从我目前阅读的内容来看,这两种方法似乎都不可能。有没有办法授予这种级别的细粒度权限,以便用户只能启动他们选择的特定服务目录产品中的资源?
【问题讨论】:
标签: amazon-web-services amazon-ec2 amazon-iam