interface HttpLambdaIntegrationProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AwsApigatewayv2Integrations.HttpLambdaIntegrationProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2integrations#HttpLambdaIntegrationProps |
Java | software.amazon.awscdk.aws_apigatewayv2_integrations.HttpLambdaIntegrationProps |
Python | aws_cdk.aws_apigatewayv2_integrations.HttpLambdaIntegrationProps |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2_integrations » HttpLambdaIntegrationProps |
Lambda Proxy integration properties.
Example
import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
declare const booksDefaultFn: lambda.Function;
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
const getBooksIntegration = new HttpLambdaIntegration('GetBooksIntegration', booksDefaultFn, {
scopePermissionToRoute: false,
});
const createBookIntegration = new HttpLambdaIntegration('CreateBookIntegration', booksDefaultFn, {
scopePermissionToRoute: false,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.GET ],
integration: getBooksIntegration,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.POST ],
integration: createBookIntegration,
});
Properties
| Name | Type | Description |
|---|---|---|
| parameter | Parameter | Specifies how to transform HTTP requests before sending them to the backend. |
| payload | Payload | Version of the payload sent to the lambda handler. |
| scope | boolean | Scope the permission for invoking the AWS Lambda down to the specific route associated with this integration. |
| timeout? | Duration | The maximum amount of time an integration will run before it returns without a response. |
parameterMapping?
Type:
Parameter
(optional, default: undefined requests are sent to the backend unmodified)
Specifies how to transform HTTP requests before sending them to the backend.
See also: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html
payloadFormatVersion?
Type:
Payload
(optional, default: PayloadFormatVersion.VERSION_2_0)
Version of the payload sent to the lambda handler.
scopePermissionToRoute?
Type:
boolean
(optional, default: true)
Scope the permission for invoking the AWS Lambda down to the specific route associated with this integration.
If this is set to false, the permission will allow invoking the AWS Lambda
from any route. This is useful for reducing the AWS Lambda policy size
for cases where the same AWS Lambda function is reused for many integrations.
timeout?
Type:
Duration
(optional, default: Duration.seconds(29))
The maximum amount of time an integration will run before it returns without a response.
Must be between 50 milliseconds and 29 seconds.

.NET
Go
Java
Python
TypeScript (