I am getting the error message "IdentityPool \'eu-central-1:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\' not found." while trying to list all S3 Buckets.
Here´s my code:
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);
}
}); });
}
and these are my credentials:
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
Anyone has an idea? The region fits and the IdentityPoolId definitely exists.
via Robert Nagel
No comments:
Post a Comment