I have a Java service running in lambda. simple hello world application with a get API. I have also configured an API gateway with the cognito user pool as my authorizer.
In my Cognito user pool, I have created a group (say admin) and added a few of my users to that group. Now I want users who have an admin group alone to access my API. At this point, any user who has signed up for the service and has valid tokens are allowed access.
I would like to know if
- I can do this with cognito authorizer in the API gateway itself or some other means with minimal code.
- If not how to implement this java. Are there any documentation for the same?