Skip to content

Commit

Permalink
Merge pull request #833 from hairyhenderson/aws-stop-overriding-empty…
Browse files Browse the repository at this point in the history
…-region-795

Fix AWS Session unknown region bug
  • Loading branch information
Dave Henderson authored and GitHub committed May 7, 2020
2 parents b63209e + b11a9e9 commit cdc8412
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aws/ec2info.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func SDKSession(region ...string) *session.Session {
panic(errors.Wrap(err, "failed to determine EC2 region"))
}
}
config = config.WithRegion(metaRegion)
if metaRegion != "" && metaRegion != unknown {
config = config.WithRegion(metaRegion)
}
config = config.WithCredentialsChainVerboseErrors(true)

sdkSession = session.Must(session.NewSessionWithOptions(session.Options{
Expand Down

0 comments on commit cdc8412

Please sign in to comment.