AWS API Gateway: response with 403 (Forbidden) instead of 401

Viewed 500

Can anyone help me in resolving 403(Forbidden) error from gateway where I was expecting 401 instead.

When I am trying to invoke a resource from API Gateway which does not exist and when the Authorization header is present, the API is responding with 403 (Forbidden) error instead of 401. If the Authorization header is not present, and if I invoke a resource from API Gateway which does not exist, then API is responding with 401 as expected. But its not working when Authorization header is present.

I have already modified the Gateway response 403 (Missing Authentication Token) to 401. But its not working when Authorization header is present in the request as explained above.

0 Answers
Related