Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Service-Specific Configuration of DynamoDB not consistent with Global Configuration #72

Closed
christophercliff opened this Issue Mar 8, 2013 · 1 comment

Comments

Projects
None yet
2 participants

According to documentation, expect to be able to use the same configuration object in both global- and service-level configs.

The global config works as expected:

AWS.config.update({
    accessKeyId: 'MY_KEY',
    secretAccessKey: 'MY_SECRET',
    region: 'us-east-1'
});
var client = new AWS.DynamoDB().client;
client.getItem();

// Success

Using the same config options at the service level:

var client = new AWS.DynamoDB({
    accessKeyId: 'MY_KEY',
    secretAccessKey: 'MY_SECRET',
    region: 'us-east-1'
}).client;
client.getItem();

//{ [SigningError: Missing credentials in config]
//  message: 'Missing credentials in config',
//  code: 'SigningError',
//  name: 'SigningError',
//  statusCode: undefined,
//  retryable: false }

You can workaround by rejiggering the options object:

var client = new AWS.DynamoDB({
    credentials: {
        accessKeyId: 'MY_KEY',
        secretAccessKey: 'MY_SECRET'
    },
    region: 'us-east-1'
}).client;
client.getItem();

// Success

@lsegal lsegal closed this in defb559 Mar 19, 2013

Contributor

lsegal commented Mar 19, 2013

Thanks for the report! I've just fixed the issue in master with the above commit, and it should now work as advertised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment