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

default region set in ~/.aws/config is ignored by call ec2.DescribeInstances() #bug #489

Closed
smile-on opened this issue Jan 7, 2016 · 2 comments
Labels
documentation This is a problem with documentation. duplicate This issue is a duplicate. feature-request A feature should be added or improved.

Comments

@smile-on
Copy link

smile-on commented Jan 7, 2016

How to reproduce bug:

  1. use widows aws cli to configure shared credentials and set default region
  2. verify cli works C:> aws.exe ec2 describe-instances
  3. have region hardcoding removed in standard describe-instances sdk example
// svc := ec2.New(session.New(), &aws.Config{Region: aws.String("us-west-2")})
svc := ec2.New(session.New())

run the example and you get error MissingRegion: could not find region configuration

@smile-on
Copy link
Author

smile-on commented Jan 7, 2016

There is similar issue #384 where this is stated as limitation rather than bug. Would be nice to make this "limitation" documented, well at least be clear in describe-instances sdk example and instead of vague

// Note that you can also configure your region globally by
// exporting the AWS_REGION environment variable

write clearly

// Note that if you want configure your region globally 
// due to current limitation, you must configure it by
// exporting the AWS_REGION environment variable
// setting in ~/.aws/config file is ignored.

Same way as programmer does "AWS_REGION must be configured to run integration tests"

@jasdel jasdel closed this as completed in 8b65071 Jan 7, 2016
@jasdel
Copy link
Contributor

jasdel commented Jan 7, 2016

Hi @smile-on thanks for contacting us. Correct #384 covers the feature request of adding support for the AWS CLI's config file to the Go SDK.

I've updated the README.md to be more clear that the AWS CLI's ~/aws/config file is not currently supported by the Go SDK and only the ~/aws/credentails shared credentails file is supported.

Closing this issue as the readme is updated, and #384 covers adding support for the aws/config file.

@jasdel jasdel added duplicate This issue is a duplicate. documentation This is a problem with documentation. feature-request A feature should be added or improved. labels Jan 7, 2016
jasdel added a commit that referenced this issue Jan 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. duplicate This issue is a duplicate. feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants