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

ConfigError: Missing region in config #209

Open
suku-h opened this issue Apr 1, 2017 · 0 comments
Open

ConfigError: Missing region in config #209

suku-h opened this issue Apr 1, 2017 · 0 comments

Comments

@suku-h
Copy link

suku-h commented Apr 1, 2017

I have done this:

console.log("a",process.env.AWS_REGION)
AWS.config.region = 'eu-west-1'
AWS.config.update({region:'eu-west-1'})
process.env.AWS_REGION = 'eu-west-1'
console.log("b",process.env.AWS_REGION)

output is this:

a undefined
b eu-west-1

I have added the following to my .aws/config in the Home folder

[profile default]
output = json
region = eu-west-1

I have also set the default region as:

export AWS_DEFAULT_REGION=eu-west-1

I have added this to Vogels:

vogels.AWS.config.update({region: 'eu-west-1'});

Yet I am getting this error:

{ ConfigError: Missing region in config
at Request.VALIDATE_REGION (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/event_listeners.js:81:45)
at Request.callListeners (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at callNextListener (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
at /home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/event_listeners.js:75:9
at finish (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/config.js:293:7)
at /home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/config.js:309:9
at SharedIniFileCredentials.get (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/credentials.js:126:7)
at getAsyncCredentials (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/config.js:303:24)
at Config.getCredentials (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/config.js:323:9)
at Request.VALIDATE_CREDENTIALS (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/event_listeners.js:70:26)
at Request.callListeners (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/sequential_executor.js:101:18)
at Request.emit (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/state_machine.js:14:12)
at Request.runTo (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/request.js:373:15)
at Request.send (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/request.js:357:10)
at DocumentClient.get (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/aws-sdk/lib/dynamodb/document_client.js:265:15)
at Table.sendRequest (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/lib/table.js:64:18)
at Table.get (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/lib/table.js:100:8)
at Function.wrapper [as get] (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/vogels/node_modules/lodash/index.js:3095:19)
at /home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/lib/dao/dynamodbdao.js:21:25
at CompanyDao.DynamoDBDao.get (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/lib/dao/dynamodbdao.js:20:16)
at CompanyController.<anonymous> (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:71:62)
at step (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:32:23)
at Object.next (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:13:53)
at /home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:7:71
at __awaiter (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:3:12)
at CompanyController.getCompany (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/company/companycontroller.js:53:16)
at Wrapped.handler (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/companyget.js:5:39)
at ex (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/lambda-wrapper/index.js:40:16)
at Wrapped.runHandler (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/lambda-wrapper/index.js:19:12)
at Wrapped.run (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/node_modules/lambda-wrapper/index.js:71:17)
at Context.<anonymous> (/home/sukumar/workspace/bizAnalyst/bizanalystserverlessv2/functions/test/unit/getCompany.js:53:28)
at callFnAsync (/usr/local/lib/node_modules/mocha/lib/runnable.js:368:21)
at Test.Runnable.run (/usr/local/lib/node_modules/mocha/lib/runnable.js:318:7)
at Runner.runTest (/usr/local/lib/node_modules/mocha/lib/runner.js:444:10)
at /usr/local/lib/node_modules/mocha/lib/runner.js:550:12
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:361:14)
at /usr/local/lib/node_modules/mocha/lib/runner.js:371:7
at next (/usr/local/lib/node_modules/mocha/lib/runner.js:295:14)
at Immediate.<anonymous> (/usr/local/lib/node_modules/mocha/lib/runner.js:339:5)
at runCallback (timers.js:651:20)
at tryOnImmediate (timers.js:624:5)
at processImmediate [as _immediateCallback] (timers.js:596:5)
message: 'Missing region in config',
code: 'ConfigError',
time: 2017-04-01T12:18:35.702Z }
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

1 participant