chamber icon indicating copy to clipboard operation
chamber copied to clipboard

Documentation: Setting Region

Open alanivey opened this issue 9 years ago • 4 comments

Fantastic tool, thank you for sharing!

I usually set my region via export AWS_DEFAULT_REGION=us-east-2 in my shell environments. I was therefore confused with the following when I tried to set a secret on my workstation:

$ chamber write testservice testkey testvalue
MissingRegion: could not find region configuration

I found the aws-sdk-go documentation on setting the region and using AWS_REGION=us-east-2 worked for me. I know this is an SDK issue, not chamber's, but perhaps it might be helpful to mention this in the project README; I could submit a PR if that would be welcomed.

alanivey avatar Sep 06 '17 20:09 alanivey

We'd definitely welcome a PR for adding this to the README. One thing you could note is that if you are running chamber from an EC2 instance (or ECS task) we do attempt to automatically infer the region you are running from (https://github.com/segmentio/chamber/blob/master/store/ssmstore.go#L33-L39).

dfuentes avatar Sep 06 '17 22:09 dfuentes

I would like to second adding that to the README. A footnote would be helpful in preventing the one issue I had when running the tool.

atbarker avatar Sep 06 '17 22:09 atbarker

Could the code check if AWS_DEFAULT_REGION is present but AWS_REGION isn't, and use that?

rafaelmagu avatar Sep 07 '17 04:09 rafaelmagu

Could definitely add that. Would still be useful to add something to the readme to let users know it's necessary. In the end we are relying on the default AWS SDK cred keychain, but that's not super apparent from an end user's perspective.

dfuentes avatar Sep 07 '17 04:09 dfuentes