I have created a Cognito user pool authorizer for an API Gateway service that invokes a lambda function. The Authorizer is getting completely ignored and I am able to invoke the service without any token. I have deployed the service multiple times. I have created multiple gateway APIs and still see the same issue.
On comparing with an older API where I have the Authorizer working the only difference I could see is that that when I check the Resource tab in the API. The old service method (POST) shows Authorization: COGNITO_USER_POOL and all the new APIs show Authorization: None. Is something broken with the API Gateway or am I missing a step.
To fix this, you should do the following steps:
And yes, you are indeed right. You are facing the problem of the Authorizer not functioning because the Authorizer is not linked to the REST API. To link it, you would need to do it manually from the Method Request Tab. Another point to note is that Authorizers can be re-used between multiple REST APIs in API Gateway.