For a React-Native application I would like to send Cognito credentials with a GET request to my API. I'm following the following approach [1]:
Cognito UserPool + Cognito Identity Pool + API Gateway + AWS_IAM Authorization + Cognito Credentials
At this current stage I can receive Cognito credentials for the associated role as explained here [2] Now, I would like to use these credentials to access my API. I have set the Authorization Type to AWS_IAM in my API Gateway. But I have no idea HOW i could send my Cognito credentials with my GET request. I have plowed through the documents, but it seems that it only explains the different SDKs.
let response = await fetch('https://12345.execute-api.us-east-1.amazonaws.com/dev/single', {
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
// What to do here??
},
Any pointers and or documentation I could look at?
[1] https://forums.aws.amazon.com/thread.jspa?threadID=230452
[2] http://mobile.awsblog.com/post/TxGNH1AUKDRZDH/Announcing-Your-User-Pool-in-Amazon-Cognito