Cognito user pools based custom authorizer.
import { CognitoUserPoolsAuthorizer } from 'aws-cdk-lib/aws-apigateway';Or use the module namespace:
import * as apigateway from 'aws-cdk-lib/aws-apigateway';
// apigateway.CognitoUserPoolsAuthorizerConfiguration passed to the constructor as CognitoUserPoolsAuthorizerProps.
cognitoUserPoolsRequiredIUserPool[]The user pools to associate with this authorizer.
authorizerNameOptionalstringAn optional human friendly name for the authorizer. Note that, this is not the primary identifier of the authorizer.
Default: - the unique construct ID
identitySourceOptionalstringThe request header mapping expression for the bearer token. This is typically passed as part of the header, in which case this should be `method.request.header.Authorizer` where `Authorizer` is the header containing the bearer token.
Default: `IdentitySource.header('Authorization')`
resultsCacheTtlOptionalDurationHow long APIGateway should cache the results. Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)
Everything you need to know about Amazon API Gateway on one page. HD quality, print-friendly.
Download Free Infographicaws-apigateway