0
votes

I have a API gateway lambda Authorizer and when it fails it all i am getting is

{
   "Message": "User is not authorized to access this resource with an explicit deny"
}

and the status code is 403

My lambda is written in dotnet core. The thing is i am doing something if my authentication failed and the status code should be 401 for that to happen. So just wanted to know if we have a way to customize this behavior

1

1 Answers

0
votes

According to this AWS documentation, that's the exact error message you will see when the Lambda authorizer function returns an IAM policy document with an explicit deny.