Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Load AWS credential data from ENV/filesystem same as AWS provided tools.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
index.js
package.json

README.md

aws-credentials

Load AWS credential data from ENV/filesystem by cascading through several styles.

var awscreds = require('aws-credentials');
awscreds('mybucket', function(err, creds) {
  // prime knox
  knox.createClient(creds)
})

Specifically:

  • Looks for $AWS_CREDENTIAL_FILE
  • Looks for ~/.s3cmd
  • Looks for $AWS_ACCESS_KEY_ID/$AWS_SECRET_ACCESS_KEY

Knox

Want to cut a couple more lines of code out of your life? Try the knox shortcut.

awscreds.knox("mybucket", function(err, client){
  console.log(err || client);
});

You need the knox module installed for this to work.

Something went wrong with that request. Please try again.