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

Region support #1

Closed
trondhindenes opened this issue Jun 13, 2018 · 11 comments
Closed

Region support #1

trondhindenes opened this issue Jun 13, 2018 · 11 comments
Assignees

Comments

@trondhindenes
Copy link

Awesome tool! It looks like there's no region support, is that correct?

@TylerBrock
Copy link
Owner

Thanks for the kind words!

Right now saw reads the region from your profile, usually whatever is in ~/.aws/config. This is a what mine looks like:

[profile default]
output = json
region = us-east-1
[profile west]
output = json
region = us-west-1

I know this isn't an ideal solution but the AWS Golang library lets you set a region using environment variables:

export AWS_REGION=us-west-1

Or, if you have another profile that is in a different region

export AWS_PROFILE=my-profile-in-other-region

This is great feedback though as I should add both a flag for region and one that lets you specify another profile. I'll work on that next!

@TylerBrock TylerBrock self-assigned this Jun 13, 2018
@hwatts
Copy link

hwatts commented Jun 13, 2018

I think the region is hard coded to us-east-1 unless I'm doing something wrong. Looks like a great tool, look forward to using it!

@spezam
Copy link

spezam commented Jun 13, 2018

blade/blade.go
26 region := endpoints.UsEast1RegionID
27 awsConfig := aws.Config{Region: &region}

seems the region is hardcoded to us-east-1

@TylerBrock
Copy link
Owner

Yep, so it is. Sorry for not looking deeper yesterday. Let me fix that up and cut a new release.

@trondhindenes
Copy link
Author

awesome!

@TylerBrock
Copy link
Owner

So sorry for the delay, my wife and I just had a baby girl Friday night so we've been exhausted and busy!

@hwatts
Copy link

hwatts commented Jun 18, 2018

Firstly, congratulations! Secondly, don’t sweat it, you’ve provided this for free and it looks awesome, you don’t owe us anything!

@spezam
Copy link

spezam commented Jun 18, 2018

Congrats Tyler :)

@TylerBrock
Copy link
Owner

Took a little break, haha! 😄I was able to have it read from the default profile pretty easily.

I still need to add overrides for region + profile so you can more easily select them via -r and -p but the v0.1.4 release should work if you have ~/.aws/config profile default to the region you want. Let me know if that works for you all right now in a pinch.

@spezam
Copy link

spezam commented Jun 18, 2018

Tested it with ~/.aws/credentials set to
[profilename]
aws_access_key_id = 123
aws_secret_access_key = 123
region = eu-west-1

and it works perfectly. Thanks again for the quick fix!

@TylerBrock
Copy link
Owner

Support for overriding default profile and the current profile's region will be released as part of v0.1.5 in a couple minutes... hold tight 🚢 :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants