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

read region from AWS_REGION and if not present set a default #3

Closed
jamengual opened this issue Jul 21, 2020 · 9 comments · Fixed by #4
Closed

read region from AWS_REGION and if not present set a default #3

jamengual opened this issue Jul 21, 2020 · 9 comments · Fixed by #4
Assignees
Labels
bug Something isn't working

Comments

@jamengual
Copy link

Hi.

I love the took and I have been using it for some time but every so often I forget to set the region and then I get not instances found error, it will be cool if instead of defaulting to eu-west it actually read the environment variable AWS_REGION first or the profile configured region.

Thanks.

@Issif
Copy link

Issif commented Jul 22, 2020

Have you tried with AWS_DEFAULT_REGION envvar ?

See : https://github.com/claranet/sshm/blob/master/main.go#L64

@jamengual
Copy link
Author

I use aws-vault and my env looks like :

AWS_DEFAULT_REGION=us-east-2
AWS_REGION=us-east-2

and I have to specify the region otherwise it does not find the instances

@Issif
Copy link

Issif commented Jul 22, 2020

OK, I will take a look but I don't use the tool anymore (I'm not working anymore at Claranet)

@Issif
Copy link

Issif commented Jul 26, 2020

@Issif Issif self-assigned this Jul 26, 2020
@Issif Issif added the bug Something isn't working label Jul 26, 2020
@Issif Issif linked a pull request Jul 26, 2020 that will close this issue
@Issif Issif closed this as completed Jul 26, 2020
@jamengual
Copy link
Author

now it works from aws-vault but without it it does not and now I wonder should this be reading from my ~/.aws/config profiles ?

since in my profiles I specify a region this should read those ?

@Issif
Copy link

Issif commented Jul 27, 2020

It never used the region parameter in .aws/config I guess I should add it. Is that urgent for you or is it okay with aws-vault for now?

@jamengual
Copy link
Author

is not urgent but I think it is expected standard.
a coworker run into that problem.

@Issif
Copy link

Issif commented Jul 27, 2020

@jamengual 1.2.2 it should be OK 😉

@jamengual
Copy link
Author

works perfectly, thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants