I have an API gateway with Cognito Authorization. When i try invoke the API enpoint using curl in the cloud 9 console I get the response:
{"message":"Forbidden"}
But when I copy the exact same curl command to https://reqbin.com/curl and run it there, I get the expected response.
I assumed this could be an issue with NACL / SG settings. But the cloud 9's EC2 instance's SG is allowing all outbound traffic and the NACL's of it's subnet and VPC are allowing all inbound and outbound traffic.
What else could be causing this? Thanks for your help.