Skip to content

Commit

Permalink
Use the shared config region when region is not set by command line f…
Browse files Browse the repository at this point in the history
…lag.

Previously, not including the `--region` flag would result in an error
being thrown and unicreds just stopping.

Now, the session will use the region as set by the environment variable
or inside one of the AWS config files (~/.aws/credentials and
~/.aws/config), if region isn't set by flag.
  • Loading branch information
sleepdeprecation committed Feb 8, 2018
1 parent b60ff8f commit 3fbd8ba
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions aws_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ func SetAwsConfig(region, profile *string, role *string) (err error) {
}
}

if aws.StringValue(region) == "" && aws.StringValue(profile) == "" {
return nil
}

// This is to work around a limitation of the credentials
// chain when providing an AWS profile as a flag
if aws.StringValue(region) == "" && aws.StringValue(profile) != "" {
Expand Down

0 comments on commit 3fbd8ba

Please sign in to comment.