Ross Gerbasi
12/30/2021, 12:01 AMauthorizationType
I am setting authorizer
for two different endpoints. When I do a build I notice the authorizers are not in the JSON template at all. I only seem to be able to get one authorizer to show up and that's when I use defaultAuthorizer
on the whole gateway. Am I missing something dumb?Frank
const authorizer1 = new HttpLambdaAuthorizer(...);
const authorizer2 = new HttpLambdaAuthorizer(...);
new Api(this, "Api", {
routes: {
"GET /routeA": {
function: "src/handlerA.main",
authorizationType: ApiAuthorizationType.CUSTOM,
authorizer: authorizer1,
},
"GET /routeB": {
function: "src/handlerB.main",
authorizationType: ApiAuthorizationType.CUSTOM,
authorizer: authorizer2,
},
}
});
Frank
HttpJwtAuthorizer
, the same idea should apply.Frank
Ross Gerbasi
12/30/2021, 2:29 PMhandler
instead of function
. Thanks for this.