カスタム開発者プロバイダ名 "my.developer"を使用してCognito IDプールを設定しました。私のノードラムダ関数から私は、次のコードを呼び出す:getOpenIdTokenForDeveloperIdentity: "これらの資格情報はこのリソースへのアクセスには有効ではありません"
AWS.config.region = 'ap-northeast-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'ap-northeast-1:*****' // I am using a valid UUID here
});
var cognitoidentity = new AWS.CognitoIdentity();
var params = {
IdentityPoolId: 'ap-northeast-1:*****',
Logins: { 'my.developer': 'test-user' }
};
cognitoidentity.getOpenIdTokenForDeveloperIdentity(params,
function(err, data) {
console.log('error:', err);
console.log('data:', data);
}
);
...私はエラーを取得する機能をテストするとき:
:{
"errorMessage": "These credentials are not valid for accessing this resource",
"errorType": "AccessDeniedException",
"stackTrace": [
"Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:43:27)",
を私は両方が似ているCognito_Unauth_RoleとCognito_Auth_Roleを持っています
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"mobileanalytics:PutEvents",
"cognito-sync:*",
"cognito-identity:*"
],
"Resource": [
"*"
]
}
]
}
...私は何が欠けていますか?