AWS CloudFormation
User Guide (API Version 2010-05-15)


The AWS::ApiGateway::VpcLink resource specifies an API Gateway VPC link for a AWS::ApiGateway::RestApi to access resources in an Amazon Virtual Private Cloud (VPC). For more information, see vpclink:create in the Amazon API Gateway REST API Reference

To declare this entity in your AWS CloudFormation template, use the following syntax:

{ "Type" : "AWS::ApiGateway::VpcLink", "Properties" : { "Description" : String, "Name" : String, "TargetArns" : [ String, ... ] } }
Type: "AWS::ApiGateway::VpcLink" Properties: Description: String Name: String TargetArns: - String



The description of the VPC link.

Required: No

Type: String

Update requires: No interruption


The name used to label and identify the VPC link.

Required: Yes

Type: String

Update requires: No interruption


The ARNs of network load balancers of the VPC targeted by the VPC link. The network load balancers must be owned by the same AWS account of the API owner.

Required: Yes

List of Type: String

Update requires: Replacement

Return Value


When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the ID of the VpcLink.

For more information about using the Ref function, see Ref.

{ "Parameters": { "description": { "Type": "String" }, "name": { "Type": "String" } }, "Resources": { "MyVpcLink": { "Type": "AWS::ApiGateway::VpcLink", "Properties": { "Description": { "Ref": "description" }, "Name": { "Ref": "name" }, "TargetArns": [ { "Ref": "MyLoadBalancer" } ] } }, "MyLoadBalancer": { "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer", "Properties": { "Type": "network", "Subnets": [ { "Ref": "MySubnet" } ] } }, "MySubnet": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": { "Ref": "MyVPC" }, "CidrBlock": "" } }, "MyVPC": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": "" } }, "MyInternetGateway": { "Type": "AWS::EC2::InternetGateway" }, "MyInternetGatewayAttachment": { "Type": "AWS::EC2::VPCGatewayAttachment", "Properties": { "VpcId": { "Ref": "MyVPC" }, "InternetGatewayId": { "Ref": "MyInternetGateway" } } } } }
Parameters: description: Type: String name: Type: String Resources: MyVpcLink: Type: AWS::ApiGateway::VpcLink Properties: Description: !Ref description Name: !Ref name TargetArns: - !Ref MyLoadBalancer MyLoadBalancer: Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: Type: network Subnets: - !Ref MySubnet MySubnet: Type: AWS::EC2::Subnet Properties: VpcId: !Ref MyVPC CidrBlock: MyVPC: Type: AWS::EC2::VPC Properties: CidrBlock: MyInternetGateway: Type: AWS::EC2::InternetGateway MyInternetGatewayAttachment: Type: AWS::EC2::VPCGatewayAttachment Properties: VpcId: !Ref MyVPC InternetGatewayId: !Ref MyInternetGateway