HttpLambdaIntegration
- class aws_cdk.aws_apigatewayv2_integrations.HttpLambdaIntegration(id, handler, *, parameter_mapping=None, payload_format_version=None, timeout=None)
Bases:
HttpRouteIntegration
The Lambda Proxy integration resource for HTTP API.
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_apigatewayv2_integrations import HttpLambdaIntegration # books_default_fn: lambda.Function books_integration = HttpLambdaIntegration("BooksIntegration", books_default_fn) http_api = apigwv2.HttpApi(self, "HttpApi") http_api.add_routes( path="/books", methods=[apigwv2.HttpMethod.GET], integration=books_integration )
- Parameters:
id (
str
) – id of the underlying integration construct.handler (
IFunction
) – the Lambda handler to integrate with.parameter_mapping (
Optional
[ParameterMapping
]) – Specifies how to transform HTTP requests before sending them to the backend. Default: undefined requests are sent to the backend unmodifiedpayload_format_version (
Optional
[PayloadFormatVersion
]) – Version of the payload sent to the lambda handler. Default: PayloadFormatVersion.VERSION_2_0timeout (
Optional
[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)
Methods
- bind(*, route, scope)
Bind this integration to the route.
- Parameters:
route (
IHttpRoute
) – The route to which this is being bound.scope (
Construct
) – The current scope in which the bind is occurring. If theHttpRouteIntegration
being bound creates additional constructs, this will be used as their parent scope.
- Return type: