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

Setting aws session region from config #45

Merged
merged 2 commits into from
Dec 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func New(config *configs.Root, configFile string, observation *observ.Observatio
if err != nil {
log.Fatalf("Failed to initialize AWS Session: %s", err)
}
awsSession.Config.Region = config.Region
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared credentials provider seems to be loading credentials from ~/.aws, but not the region. I also don't see anything in the code suggesting that it is loading the region.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it might not be configured the regions from the credentials file.

There's actually a few other places, though, where we set this default to us-east-1. I'd rather this isn't scattered all over the code base. Can we get it centralized in a single spot somewhere?

eg

if s.Config.Region == nil {

if input.region == nil {


var apiClient APIer
if config.API.Host != nil && config.API.BasePath != nil {
Expand Down