ca98am79 / connect-dynamodb

DynamoDB session store for Connect
http://ca98am79.github.com/connect-dynamodb/
MIT License
144 stars 66 forks source link

Does not fetch credentials from environment variables #15

Closed etiennea closed 10 years ago

etiennea commented 10 years ago

It doe snot work without a credentials.json file

{ accessKeyId: AWS_ACCESS_KEY_ID, secretAccessKey: AWS_SECRET_KEY, region: 'us-east-1' } or smth like that would enable us not to have credential in the repo. I would improve it but I am sure someone understands these things much better than me.

ca98am79 commented 10 years ago

Hi - are you specifying the location of the credentials file with the AWSConfigPath param option? It defaults to './aws-config.json'

etiennea commented 10 years ago

I should not have to have a aws-config.json if I use elasticbeanstalk as the credentials should be fetched from the server environment variables no?

etiennea commented 10 years ago

I found a branch where I can specify the credentials during init so that fixed this problem. The whole idea was not to have a config.json in my git so the credentials can be provided as environment variables.

ca98am79 commented 10 years ago

Could you tell me what branch you used? It's possible I can merge it into this - being able to use environmental variables would be nice.

With this current branch the solution is to create the config files during deployment.

jaketrent commented 10 years ago

@ca98am79 looks like this might be the branch @etiennea was referencing that allowed config via the constructor:

https://github.com/brutalhonesty/connect-dynamodb/commit/4351a05562b3be7febe7f54fe4ca5b64ee7deeff

This is nice for the reasons he stated. It would be even nicer to match the AWS SDK defaults by pulling straight from the environment vars.

http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html

"Remember, if you set your AWS credentials in your environment variables, the AWS SDK for Node.js will automatically detect them, and you will not need to perform any manual credential configuration in your application."

ca98am79 commented 10 years ago

Thanks Jake, I agree and I'm re-opening this to make those changes

jaketrent commented 10 years ago

w00t!