@aws-cdk_aws-apigatewayv2-integrations-alpha.HttpLambdaIntegration

class HttpLambdaIntegration ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Integrations.Alpha.HttpLambdaIntegration
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2integrationsalpha/v2#HttpLambdaIntegration
Javasoftware.amazon.awscdk.services.apigatewayv2.integrations.alpha.HttpLambdaIntegration
Pythonaws_cdk.aws_apigatewayv2_integrations_alpha.HttpLambdaIntegration
TypeScript (source)@aws-cdk/aws-apigatewayv2-integrations-alpha ยป HttpLambdaIntegration

Extends HttpRouteIntegration

The Lambda Proxy integration resource for HTTP API.

Example

import { HttpLambdaIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

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 HttpLambdaIntegrationProps โ€” properties to configure the integration.

Methods

NameDescription
bind(_options)๐Ÿ”นBind this integration to the route.
protected completeBind(options)๐Ÿ”นComplete the binding of the integration to the route.

bind(_options)๐Ÿ”น

public bind(_options: HttpRouteIntegrationBindOptions): HttpRouteIntegrationConfig

Parameters

  • _options HttpRouteIntegrationBindOptions

Returns

  • HttpRouteIntegrationConfig

Bind this integration to the route.


protected completeBind(options)๐Ÿ”น

protected completeBind(options: HttpRouteIntegrationBindOptions): void

Parameters

  • options HttpRouteIntegrationBindOptions

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.