Skip to content

Commit 3cdac5c

Browse files
authored
Merge pull request #88 from zytek/sdk_load_config
sdk: load config by default
2 parents 77c61e0 + af699b5 commit 3cdac5c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

store/ssmstore.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ func NewSSMStore(numRetries int) *SSMStore {
4545
if regionOverride, ok := os.LookupEnv("CHAMBER_AWS_REGION"); ok {
4646
region = aws.String(regionOverride)
4747
}
48-
ssmSession := session.Must(session.NewSession(&aws.Config{
49-
Region: region,
50-
}))
48+
ssmSession := session.Must(session.NewSessionWithOptions(
49+
session.Options{
50+
Config: aws.Config{
51+
Region: region,
52+
},
53+
SharedConfigState: session.SharedConfigEnable,
54+
},
55+
))
5156

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

0 commit comments

Comments
 (0)