in provision/lib/provision-stack.ts [324:338]
private defineAPIRoute(
method: string,
resource: agw.Resource,
integration: lambdaNodejs.NodejsFunction,
authorizer: agw.CognitoUserPoolsAuthorizer | null = null,
): void {
if (authorizer) {
resource.addMethod(method, new agw.LambdaIntegration(integration), {
authorizationType: agw.AuthorizationType.COGNITO,
authorizer,
});
} else {
resource.addMethod(method, new agw.LambdaIntegration(integration));
}
}