AWS API Gateway VPC Link

This page shows how to write Terraform and CloudFormation for API Gateway VPC Link and write them securely.

aws_api_gateway_vpc_link (Terraform)

The VPC Link in API Gateway can be configured in Terraform with the resource name aws_api_gateway_vpc_link. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_api_gateway_vpc_link" "vpc_link" {
  count = local.create_api_link
  name = local.vpc_link_name
  target_arns = [var.vpc_link_target_arn]
resource "aws_api_gateway_vpc_link" "default" {
    name = var.vpc_link_name
    description = var.vpc_link_description
    target_arns = var.target_arns
resource "aws_api_gateway_vpc_link" "this" {
  name        =
  target_arns = [aws_lb.this.arn]

  tags = var.tags


Explanation in Terraform Registry

Provides an API Gateway VPC Link. -> Note: Amazon API Gateway Version 1 VPC Links enable private integrations that connect REST APIs to private resources in a VPC. To enable private integration for HTTP APIs, use the Amazon API Gateway Version 2 VPC Link resource.

AWS::ApiGateway::VpcLink (CloudFormation)

The VpcLink in ApiGateway can be configured in CloudFormation with the resource name AWS::ApiGateway::VpcLink. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

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

Frequently asked questions

AWS API Gateway VPC Link is a resource for API Gateway of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

For Terraform, the osodevops/aws-terraform-module-apigateway, chuleh/tf-aws-vpc-link-module and babbel/terraform-aws-nlb-for-apigateway-vpc-link source code examples are useful. See the Terraform Example section for further details.