在向用户池注册新用户的上下文中,我的IdentityPoolID是什么?

时间:2016-06-23 06:46:02

标签: javascript debugging amazon-web-services

我很困惑和沮丧。在以下链接中显示如何使用Javascript SDK将新用户注册到用户池,您将看到:

AWS.config.region = 'us-east-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: '...' // your identity pool id here
});

AWSCognito.config.region = 'us-east-1';
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: '...' // your identity pool id here
});

http://docs.aws.amazon.com/cognito/latest/developerguide/using-amazon-cognito-user-identity-pools-javascript-examples.html#using-amazon-cognito-user-identity-pools-javascript-examples-confirm-registration

然而,我无法在我的AWS控制台Cognito区域中找到任何名称以IdentityPoolId调用自身的内容,这让我不确定我应该为IdentityPoolId字段输入什么。如果我输入一个随机字符串,如' 1234'作为IdentitiyPoolId我弹出以下错误:

ValidationException: Missing credentials in config

但如果我加入类似的东西:

us-east-1:758097645222

我收到此错误:

ResourceNotFoundException: Missing credentials in config

我打算作为我的identityPoolId输入什么,我在哪里可以找到它以及这两个不同错误的来源是什么?!

由于

1 个答案:

答案 0 :(得分:1)

  

要获取身份池ID,您应该使用"管理联合身份" Cognito控制台的一部分不是"管理用户池"节

来源:https://stackoverflow.com/a/37224093/1198079