创建 vpc 链接 aws 所需的权限

时间:2021-01-07 06:08:52

标签: amazon-web-services amazon-vpc api-gateway

我正在尝试创建 vpc 链接以将 api 网关与我的 ec2 实例连接。我已经创建了网络负载均衡器。现在尝试在 api 网关中创建 VPC 链接。但是在创建它时会抛出一个错误:

VPC link creation failed
User does not have sufficient permissions to create VPC endpoint services.

创建 VPC 链接需要哪些所有权限?

谢谢!

1 个答案:

答案 0 :(得分:0)

创建 VPCLink 所需的权限在 AWS docs 中有详细说明,它们可以封装在以下 IAM 策略中:

{  
   "Version":"2012-10-17",
   "Statement":[  
      {  
         "Effect":"Allow",
         "Action":[  
            "ec2:CreateVpcEndpointServiceConfiguration",
            "ec2:DeleteVpcEndpointServiceConfigurations",
            "ec2:DescribeVpcEndpointServiceConfigurations",
            "ec2:ModifyVpcEndpointServicePermissions"
         ],
         "Resource":"*"
      },
      {  
         "Effect":"Allow",
         "Action":[  
            "elasticloadbalancing:DescribeLoadBalancers"
         ],
         "Resource":"*"
      }
   ]
}