Skip to content

IntegrationResource

Source: src/AWS/ApiGatewayV2/Integration.ts

An API Gateway v2 Integration — the backend target a Route forwards to.

For HTTP APIs the common integration is AWS_PROXY with payload format 2.0, pointing directly at a Lambda function ARN. For WebSocket APIs the integrationUri must be the full Lambda invocation URI.

const integration = yield* ApiGatewayV2.Integration("Fn", {
api,
integrationType: "AWS_PROXY",
integrationUri: fn.functionArn,
payloadFormatVersion: "2.0",
});
const integration = yield* ApiGatewayV2.Integration("Upstream", {
api,
integrationType: "HTTP_PROXY",
integrationUri: "https://example.com/{proxy}",
integrationMethod: "ANY",
payloadFormatVersion: "1.0",
});