AWS API Gateway V2 Integration

This page shows how to write Terraform and CloudFormation for API Gateway V2 Integration and write them securely.

aws_apigatewayv2_integration (Terraform)

The Integration in API Gateway V2 can be configured in Terraform with the resource name aws_apigatewayv2_integration. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

integrations.tf#L1
resource "aws_apigatewayv2_integration" "cars" {
  api_id             = aws_apigatewayv2_api.neocar_api.id
  integration_type   = "HTTP_PROXY"
  integration_method = "ANY"
  integration_uri    = var.LBListener
  connection_type    = "VPC_LINK"

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an Amazon API Gateway Version 2 integration. More information can be found in the Amazon API Gateway Developer Guide.

AWS::ApiGatewayV2::Integration (CloudFormation)

The Integration in ApiGatewayV2 can be configured in CloudFormation with the resource name AWS::ApiGatewayV2::Integration. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

AWS_ApiGatewayV2_IntegrationResource.schema.json#L15
      "default" : "AWS::ApiGatewayV2::Integration"
    },
    "Properties" : {
      "$ref" : "AWS_ApiGatewayV2_Integration.schema.json"
    }
  }
AWS_ApiGatewayV2_IntegrationResponseResource.schema.json#L15
      "default" : "AWS::ApiGatewayV2::IntegrationResponse"
    },
    "Properties" : {
      "$ref" : "AWS_ApiGatewayV2_IntegrationResponse.schema.json"
    }
  }

Parameters

Explanation in CloudFormation Registry

The AWS::ApiGatewayV2::Integration resource creates an integration for an API.

Frequently asked questions

What is AWS API Gateway V2 Integration?

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

Where can I find the example code for the AWS API Gateway V2 Integration?

For Terraform, the CyberiumShadow/CloudComputing-Assignment3 source code example is useful. See the Terraform Example section for further details.

For CloudFormation, the shiver-me-timbers/smt-cloudformation-parent and shiver-me-timbers/smt-cloudformation-parent source code examples are useful. See the CloudFormation Example section for further details.