创建 vpc 链接 aws 所需的权限

Permissions required to create vpc links aws

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

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

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

谢谢!

创建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":"*"
      }
   ]
}