AWS API gateway : Missing Authentication Token response for the HTTP operation which is not supported

I am using AWS API gateway and AWS lambda function.

When I invoke the API through the client like Postman and specify the HTTP operation, I get an error -

Response code: 401
Response:
{ "message": "Missing Authentication Token" }

Ideally I should receive an error - Response code 405 [Method not allowed]

Is there any way this can be configured?

1 Like