LambdaIntegration Class
Integrates an AWS Lambda function to an API Gateway method.
Example
ts
declare const resource: apigateway.Resource;
declare const handler: lambda.Function;
resource.addMethod('GET', new apigateway.LambdaIntegration(handler));
python
# resource: apigateway.Resource
# handler: lambda.Function
resource.add_method("GET", apigateway.LambdaIntegration(handler))
java
Resource resource;
Function handler;
resource.addMethod("GET", new LambdaIntegration(handler));
csharp
// Install: dotnet add package Amazon.CDK.Lib
Resource resource;
Function handler;
resource.AddMethod("GET", new LambdaIntegration(handler));
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var resource Resource
var handler Function
resource.AddMethod(jsii.String("GET"), apigateway.NewLambdaIntegration(handler))
Initializer
ts
new LambdaIntegration(handler: IFunction, options?: LambdaIntegrationOptions)
python
LambdaIntegration(handler: IFunction, options: typing.Optional[LambdaIntegrationOptions] = None)
java
new LambdaIntegration(IFunction handler, LambdaIntegrationOptions options)
csharp
new LambdaIntegration(IFunction handler, LambdaIntegrationOptions? options = null)
go
NewLambdaIntegration(Handler IFunction, Options LambdaIntegrationOptions)
Methods
bind(method: Method): IntegrationConfigdef bind(self, method: Method) -> IntegrationConfigpublic IntegrationConfig bind(Method method)public IntegrationConfig Bind(Method method)func Bind(Method Method) IntegrationConfig#Can be overridden by subclasses to allow the integration to interact with the method being integrated, access the REST API object, method ARNs, etc.