class HttpLambdaAuthorizer
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.APIGatewayv2.Authorizers.HttpLambdaAuthorizer | 
  Java | software.amazon.awscdk.services.apigatewayv2.authorizers.HttpLambdaAuthorizer | 
  Python | aws_cdk.aws_apigatewayv2_authorizers.HttpLambdaAuthorizer | 
  TypeScript (source) | @aws-cdk/aws-apigatewayv2-authorizers » HttpLambdaAuthorizer | 
Implements
IHttp
Authorize Http Api routes via a lambda function.
Example
import { HttpLambdaAuthorizer, HttpLambdaResponseType } from '@aws-cdk/aws-apigatewayv2-authorizers';
import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
// This function handles your auth logic
declare const authHandler: lambda.Function;
const authorizer = new HttpLambdaAuthorizer('BooksAuthorizer', authHandler, {
  responseTypes: [HttpLambdaResponseType.SIMPLE], // Define if returns simple and/or iam response
});
const api = new apigwv2.HttpApi(this, 'HttpApi');
api.addRoutes({
  integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.myproxy.internal'),
  path: '/books',
  authorizer,
});
Initializer
new HttpLambdaAuthorizer(id: string, handler: IFunction, props?: HttpLambdaAuthorizerProps)
Parameters
- id 
string— The id of the underlying construct. - handler 
IFunction - props 
Http— Properties to configure the authorizer.Lambda Authorizer Props  
Initialize a lambda authorizer to be bound with HTTP route.
Methods
| Name | Description | 
|---|---|
| bind(options) | Bind this authorizer to a specified Http route. | 
bind(options)
public bind(options: HttpRouteAuthorizerBindOptions): HttpRouteAuthorizerConfig
Parameters
- options 
HttpRoute Authorizer Bind Options  
Returns
Bind this authorizer to a specified Http route.

 .NET
 Java
 Python
 TypeScript (