Testing API endpoint with API Gateway + Lambda Authorizer + Cognito

Viewed 24

So this is probably a basic question but I can't seem to work my way around it for this particular setting.

Situation: I have created an endpoint in API gateway and added a Lambda Authorizer that validates authorizationToken and adds user context which is used in the lambda behind the gateway.

I have a Cognito user pool with the OAuth flows as seen below: Cognito

Question: What is the correct way to test this endpoint? My idea was to do it through the CLI either using apig-test or aws cognito-idp initiate-auth but I can't seem to get it right. When e.g using the apig-test it says that the identity-pool-id argument is required but I'm not using identity pools..

Other suggestions for best practice testing in cases like these is most welcome.

0 Answers
Related