AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

HttpIntegration

The integration for an API route.

Import

import { HttpIntegration } from 'aws-cdk-lib/aws-apigatewayv2';

Or use the module namespace:

import * as apigatewayv2 from 'aws-cdk-lib/aws-apigatewayv2';
// apigatewayv2.HttpIntegration

Properties

Configuration passed to the constructor as HttpIntegrationProps.

httpApiRequired
IHttpApiRef

The HTTP API to which this integration should be bound.

integrationTypeRequired
HttpIntegrationType

Integration type.

connectionIdOptional
string

The ID of the VPC link for a private integration. Supported only for HTTP APIs.

Default: - undefined

connectionTypeOptional
HttpConnectionType

The type of the network connection to the integration endpoint.

Default: HttpConnectionType.INTERNET

credentialsOptional
IntegrationCredentials

The credentials with which to invoke the integration.

Default: - no credentials, use resource-based permissions on supported AWS services

integrationSubtypeOptional
HttpIntegrationSubtype

Integration subtype. Used for AWS Service integrations, specifies the target of the integration.

Default: - none, required if no `integrationUri` is defined.

integrationUriOptional
string

Integration URI. This will be the function ARN in the case of `HttpIntegrationType.AWS_PROXY`, or HTTP URL in the case of `HttpIntegrationType.HTTP_PROXY`.

Default: - none, required if no `integrationSubtype` is defined.

methodOptional
HttpMethod

The HTTP method to use when calling the underlying HTTP proxy.

Default: - none. required if the integration type is `HttpIntegrationType.HTTP_PROXY`.

parameterMappingOptional
ParameterMapping

Specifies how to transform HTTP requests before sending them to the backend.

Default: undefined requests are sent to the backend unmodified

payloadFormatVersionOptional
PayloadFormatVersion

The version of the payload format.

Default: - defaults to latest in the case of HttpIntegrationType.AWS_PROXY`, irrelevant otherwise.

secureServerNameOptional
string

Specifies the TLS configuration for a private integration.

Default: undefined private integration traffic will use HTTP protocol

timeoutOptional
Duration

The maximum amount of time an integration will run before it returns without a response. Must be between 50 milliseconds and 29 seconds.

Default: Duration.seconds(29)

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter