Giter Site home page Giter Site logo

Region support about saw HOT 11 CLOSED

tylerbrock avatar tylerbrock commented on May 23, 2024 1
Region support

from saw.

Comments (11)

hwatts avatar hwatts commented on May 23, 2024 3

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

from saw.

spezam avatar spezam commented on May 23, 2024 3

Congrats Tyler :)

from saw.

TylerBrock avatar TylerBrock commented on May 23, 2024 2

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

from saw.

TylerBrock avatar TylerBrock commented on May 23, 2024 2

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:

from saw.

hwatts avatar hwatts commented on May 23, 2024 1

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!

from saw.

spezam avatar spezam commented on May 23, 2024 1

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

seems the region is hardcoded to us-east-1

from saw.

spezam avatar spezam commented on May 23, 2024 1

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!

from saw.

TylerBrock avatar TylerBrock commented on May 23, 2024

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!

from saw.

trondhindenes avatar trondhindenes commented on May 23, 2024

awesome!

from saw.

TylerBrock avatar TylerBrock commented on May 23, 2024

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

from saw.

TylerBrock avatar TylerBrock commented on May 23, 2024

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.

from saw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.