I need to get a list of users in my Cognito pool using AWS javascript SDK. I was going to use CognitoIdentity class and the following method to get user list:
var params = {
IdentityPoolId: 'STRING_VALUE', /* required */
...
};
cognitoidentity.listIdentities(params, function(err, data) {
...
});
However, it requires IdentityPoolId in a very strange format:
An identity pool ID in the format REGION:GUID.
The check for which looks like:
[\w-]+:[0-9a-f-]+
That is, region name should be without numbers. However, most of the regions have numbers, for example, my region is "ap-northeast-1". Both Pool Id and Pool ARN values don't match. What is the real format of this id and where to get the value for my user pool?
The example of the IdentityPoolId
is provided in the API documentation for ListIdentities:
An identity pool ID in the format REGION:GUID.
Pattern: [\w-]+:[0-9a-f-]+
Example given:
"IdentityPoolId": "us-east-1:509f9747-5b5d-484e-a2d7-74fcba108147"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With