Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use region provided in config.json #36

Closed
iowusu opened this issue Nov 12, 2017 · 2 comments
Closed

Cannot use region provided in config.json #36

iowusu opened this issue Nov 12, 2017 · 2 comments

Comments

@iowusu
Copy link

iowusu commented Nov 12, 2017

Hi,

I am my config.json contains region. I am using

// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
// Load credentials and set region from JSON file
AWS.config.loadFromPath('config/config.json');

//AWS.config.update({region: 'us-east-1'});

var $db = new AWS.DynamoDB();
var DynamoDB = require('@awspilot/dynamodb')($db);

But I still get
ConfigError: Missing region in config error .

Config.json looks like
{ "accessKeyId": "XXXXXXXXXX",
"secretAccessKey": "##############",
"region": "us-east-1"
}

@iowusu iowusu changed the title Cannot use region provider in config.json Cannot use region provided in config.json Nov 12, 2017
@adrianpraja
Copy link
Member

It seems that DynamoDB / dynamodb-doc had similar issues in the past
awslabs/dynamodb-document-js-sdk#16

I see that $db instanceof AWS.DynamoDB returns false
because @awspilot/dynamodb internally uses another instance of AWS.DynamoDB

I will find a fix thanks for reporting

@adrianpraja
Copy link
Member

I've pushed @awspilot/dynamodb:1.0.9 that has this fixed

Please re-open this issue if you still see the error

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants