找不到Cognito S3 IdentityPool

我收到错误消息“IdentityPool \'欧共体 – 1:xxxxxx – xxxx – xxxx – xxxx – xxxxxxxxxxxx \'找不到”。 同时试图列出所有的S3桶。

这里是我的代码:

ListBuckets: function() { aws.config.region = 'eu-central-1'; // 1. Enter your region aws.config.credentials = new aws.CognitoIdentityCredentials({ IdentityPoolId: 'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' // 2. Enter your identity pool }); aws.config.credentials.get(function(err) { if (err) console.log("Error: " + err); console.log(aws.config.credentials); var s3 = new aws.S3(); s3.listBuckets(function(err, data) { if (err) { console.log("Error", err); } else { console.log("Bucket List", data.Buckets); } }); }); } 

这些是我的凭据:

 CognitoIdentityCredentials { expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: { IdentityPoolId: 'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', RoleSessionName: 'web-identity' }, data: null, _identityId: null, _clientConfig: {}, webIdentityCredentials: WebIdentityCredentials { expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: { IdentityPoolId: 'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', RoleSessionName: 'web-identity' }, data: null, _clientConfig: {} }, cognito: Service { config: Config { credentials: [Circular], credentialProvider: [Object], region: 'eu-central-1', logger: null, apiVersions: {}, apiVersion: null, endpoint: 'cognito-identity.eu-central-1.amazonaws.com', httpOptions: [Object], maxRetries: undefined, maxRedirects: 10, paramValidation: true, sslEnabled: true, s3ForcePathStyle: false, s3BucketEndpoint: false, s3DisableBodySigning: true, computeChecksums: true, convertResponseTypes: true, correctClockSkew: false, customUserAgent: null, dynamoDbCrc32: true, systemClockOffset: 0, signatureVersion: 'v4', signatureCache: true, retryDelayOptions: {}, useAccelerateEndpoint: false, params: [Object] },CognitoIdentityCredentials { expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: { IdentityPoolId: 'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', RoleSessionName: 'web-identity' }, data: null, _identityId: null, _clientConfig: {}, webIdentityCredentials: WebIdentityCredentials { expired: true, expireTime: null, accessKeyId: undefined, sessionToken: undefined, params: { IdentityPoolId: 'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', RoleSessionName: 'web-identity' }, data: null, _clientConfig: {} }, cognito: Service { config: Config { credentials: [Circular], credentialProvider: [Object], region: 'eu-central-1', logger: null, apiVersions: {}, apiVersion: null, endpoint: 'cognito-identity.eu-central-1.amazonaws.com', httpOptions: [Object], maxRetries: undefined, maxRedirects: 10, paramValidation: true, sslEnabled: true, s3ForcePathStyle: false, s3BucketEndpoint: false, s3DisableBodySigning: true, computeChecksums: true, convertResponseTypes: true, correctClockSkew: false, customUserAgent: null, dynamoDbCrc32: true, systemClockOffset: 0, signatureVersion: 'v4', signatureCache: true, retryDelayOptions: {}, useAccelerateEndpoint: false 

任何人有一个想法? 该地区适合和IdentityPoolId肯定存在。