The set of arguments for constructing a request LambdaAuthorizer resource.

interface RequestAuthorizerArgs {
    authorizerName?: string;
    authorizerResultTtlInSeconds?: number;
    handler: any;
    headers?: string[];
    queryParameters?: string[];
}

Properties

authorizerName?: string

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

authorizerResultTtlInSeconds?: number

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

handler: any

The authorizerHandler specifies information about the authorizing Lambda. You can either set up the Lambda separately and just provide the required information or you can define the Lambda inline using a JavaScript function.

headers?: string[]

headers is an array of the expected header keys used to authorize a request. While this argument is optional, at least one queryParameter or one header must be defined.

queryParameters?: string[]

queryParameters is an array of the expected query parameter keys used to authorize a request. While this argument is optional, at least one queryParameter or one header must be defined.

Generated using TypeDoc