Debugging API Gateway

So up until now, have been following and everything is working flawlessly, until I get to:

Specifically running the npx command I get:

npx: installed 106 in 9.605s

Authenticating with User Pool
Getting temporary credentials
Making API request
{ status: 403,
statusText: ‘Forbidden’,
data: { message: ‘Forbidden’ } }

Playing round with the URL (like adding a ‘/’ at the end) I can change that to a 404, but that’s it.

So diving into this page:

Follow the steps, go into the AWS console, I can find the API-Gateway-Execution-Logs_xxxxxx log group that I created. However the page above says there should be 300 streams, however mine shows ‘There are no log streams.’.

Running the npx command again does not create any. I tried creating one manually, but it stays empty.

I’ve gone back over the previous chapters and verified everything (either that or missed a step twice), and googled at length, but I’m stuck - what can I look at/how can I debug this without logs?

More info: Fired up postman, postman can connect successfully using the master AWS creds to the endpoint. This also generates log entries in CloudWatch;

So this appears to be a credential/access problem? About to go through the Cognito pages again and make sure I didn’t miss anything.

Still stuck…

Policy simulator shows ‘allowed’ if I use the full arn that matches the resource in the policy, ‘denied’ if I leave the resource at the default ‘*’

Anyone?

Well, it’s working finally! Don’t know what the original cause was. However as part of trouble shooting I created a second app client id; with everything else I tweaked, deleting that and everything started working…

Glad you figured it out. Which steps did you redo?

all of them :frowning:

1 Like

Wow. That’s a terrible experience.