Monday, May 20, 2024
2
rated 0 times [  7] [ 5]  / answers: 1 / hits: 30488  / 9 Years ago, sun, may 24, 2015, 12:00:00

I am using the AWS Javascript API and trying to get the assigned cognito id:



AWS.config.credentials.get(function(err) {
if (!err) {
console.log(Cognito Identity Id: + AWS.config.credentials.identityId);
}
});


Why does this result in a 400 error with the message below?



{__type:InvalidIdentityPoolConfigurationException,message:Invalid identity pool configuration. Check assigned IAM roles for this pool.}


I have IAM roles configured for authenticated and non-authenticated users.



{
Version: 2012-10-17,
Statement: [{
Action: [
mobileanalytics:PutEvents,
cognito-sync:*
],
Effect: Allow,
Resource: [
*
]
}]
}

More From » amazon-web-services

 Answers
12

The most common reason for this error is your roles aren't set up to trust your identity pool. You should confirm that the identity pool id listed in your trust relationships matches the identity pool you are using.


More info on trust relationships in Amazon Cognito can be found in our developer guide.


[#66489] Thursday, May 21, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
corie

Total Points: 371
Total Questions: 110
Total Answers: 113

Location: Cambodia
Member since Thu, Oct 7, 2021
3 Years ago
;