Skip to content

Commit

Permalink
Fix AWS Session unknown region bug
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
  • Loading branch information
Dave Henderson committed May 7, 2020
1 parent b63209e commit b11a9e9
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 b11a9e9

Please sign in to comment.