Создан IdentityPool и userPool.
Region, AccountId, IdentityPoolId и roleArn, переданные как параметры, содержат правильные значения.
Вызов CognitoIdentityCredentials
AWS.config.region = region;
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
AccountId: accountId,
IdentityPoolId: identityPoolId,
RoleArn: roleArn,
});
возвращает (секретные учетные данные запутаны)
{
"expired": true,
"expireTime": null,
"refreshCallbacks": [],
"params": {
"AccountId": "9999999999",
"IdentityPoolId": "eu-west-2:bcfbd1c9-1234-1234-1234-423be5c3f7d8",
"RoleArn": "arn:aws:iam: : 999999999:role/Cognito_ElasticSearchIdentityPoolAuth_Role"
},
"data": null,
"_identityId": null,
"_clientConfig": {}
}
Я ожидаю, что этот вызов вернет accessKeyId
и sessionToken
.
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityCredentials.html