Skip to content

Commit

Permalink
Merge pull request #88 from zytek/sdk_load_config
Browse files Browse the repository at this point in the history
sdk: load config by default
  • Loading branch information
dfuentes committed May 8, 2018
2 parents 77c61e0 + af699b5 commit 3cdac5c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions store/ssmstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ func NewSSMStore(numRetries int) *SSMStore {
if regionOverride, ok := os.LookupEnv("CHAMBER_AWS_REGION"); ok {
region = aws.String(regionOverride)
}
ssmSession := session.Must(session.NewSession(&aws.Config{
Region: region,
}))
ssmSession := session.Must(session.NewSessionWithOptions(
session.Options{
Config: aws.Config{
Region: region,
},
SharedConfigState: session.SharedConfigEnable,
},
))

// If region is still not set, attempt to determine it via ec2 metadata API
region = nil
Expand Down

0 comments on commit 3cdac5c

Please sign in to comment.