Skip to content

Getting missing credentials error, even though I am passing in s3 object #3

Description

@sferoze

Here is my error:

{ [TimeoutError: Missing credentials in config]
I20160903-14:46:41.268(-4)?   message: 'Missing credentials in config',
I20160903-14:46:41.268(-4)?   code: 'CredentialsError',
I20160903-14:46:41.269(-4)?   time: Sat Sep 03 2016 14:46:41 GMT-0400 (EDT),
I20160903-14:46:41.269(-4)?   originalError: 
I20160903-14:46:41.269(-4)?    { message: 'Could not load credentials from any providers',
I20160903-14:46:41.269(-4)?      code: 'CredentialsError',
I20160903-14:46:41.269(-4)?      time: Sat Sep 03 2016 14:46:41 GMT-0400 (EDT),
I20160903-14:46:41.269(-4)?      originalError: 
I20160903-14:46:41.270(-4)?       { message: 'Connection timed out after 1000ms',
I20160903-14:46:41.270(-4)?         code: 'TimeoutError',
I20160903-14:46:41.270(-4)?         time: Sat Sep 03 2016 14:46:41 GMT-0400 (EDT) } } }

Here is my code

AWS.config.update
      accessKeyId: Meteor.settings.AWSAccessKeyId
      secretAccessKey: Meteor.settings.AWSSecretAccessKey
      region: 'US Standard'

    s3 = new AWS.S3()
    s3Sizer = new S3Sizer({"s3": s3})

s3Sizer.getFolderSize 'bucket.name', directory, (err, size) ->
      if err
        console.log(err)
      else
        console.log(size)

I use the same s3 object to delete files from the bucket and it works fine. How come with your package I keep getting this error and it does not work at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions