I have this authorizer function which return this response if allow:
"principalId": principal,
"policyDocument":{
"Version" : "2023-03-28",
"Statement": [
{
"Action": "execute-api:Invoke",
"Effect": "Allow",
"Resource": "*",
}
],
},
I have tested it using sls offline, if it passed and return this response, it triggers the lambda that I’m calling. But when I get to deploy it on the actual server, for some reason the lambda after authorizer does not get call at all. I’m not sure if it something that I set up in serverless.yml or what’s wrong with it.
What I expect and it work offline:
Request → Authorizer (allow) → lambda trigger
But what I get is:
Request → Authorizer (allow)
There’s no sign of lambda being trigger at all. Is there anything I need to check for this? Normally on sls offline if the response is incorrect it would show the error like:
Authorization function returned an error response: (λ: authorizer)
But I don’t think I can find that online