Skip to content

Commit

Permalink
Disable shared config loaded by the SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
mtibben committed Feb 16, 2020
1 parent f26b718 commit 1ce3655
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ const defaultExpirationWindow = 5 * time.Minute
var UseSessionCache = true

func NewSession(creds *credentials.Credentials, region string) (*session.Session, error) {
return session.NewSession(aws.NewConfig().WithRegion(region).WithCredentials(creds))
return session.NewSessionWithOptions(session.Options{
Config: aws.Config{
Region: aws.String(region),
Credentials: creds,
},
SharedConfigState: session.SharedConfigDisable,
})
}

func FormatKeyForDisplay(k string) string {
Expand Down

0 comments on commit 1ce3655

Please sign in to comment.