class HttpLambdaIntegration
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.APIGatewayv2.Integrations.HttpLambdaIntegration |
Java | software.amazon.awscdk.services.apigatewayv2.integrations.HttpLambdaIntegration |
Python | aws_cdk.aws_apigatewayv2_integrations.HttpLambdaIntegration |
TypeScript (source) | @aws-cdk/aws-apigatewayv2-integrations » HttpLambdaIntegration |
Extends
Http
The Lambda Proxy integration resource for HTTP API.
Example
import { HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
declare const booksDefaultFn: lambda.Function;
const booksIntegration = new HttpLambdaIntegration('BooksIntegration', booksDefaultFn);
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.GET ],
integration: booksIntegration,
});
Initializer
new HttpLambdaIntegration(id: string, handler: IFunction, props?: HttpLambdaIntegrationProps)
Parameters
- id
string
— id of the underlying integration construct. - handler
IFunction
— the Lambda handler to integrate with. - props
Http
— properties to configure the integration.Lambda Integration Props
Methods
Name | Description |
---|---|
bind(_) | Bind this integration to the route. |
protected complete | Complete the binding of the integration to the route. |
bind(_)
public bind(_: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig
Parameters
Returns
Bind this integration to the route.
Bind(options)
protected completeprotected completeBind(options: HttpRouteIntegrationBindOptions): void
Parameters
- options
Http
Route Integration Bind Options
Complete the binding of the integration to the route.
In some cases, there is some additional work to do, such as adding permissions for the API to access the target. This work is necessary whether the integration has just been created for this route or it is an existing one, previously created for other routes. In most cases, however, concrete implementations do not need to override this method.