Invoke API Gateway function with Cognito Authentication from Javascript

Thanks fanjie!

I’m using just a Identity Pool federated with Facebook login.

I just need to use AWS SDK Javascript or do I need to download also API Gateway SDK Javascript?

Right now I have this callback:

AWS.config.credentials.get(function(err){
console.log(err);
});

Where the user is authenticate on Cognito, but I can’t find any example on what to do next, how does AWS.APIGateway knows it’s authenticated and how do I call the functions with this apigateway. Do you know any examples I could follow? The ones I found seem to be a different case scenario.

Thank you!

2 Likes