Only use specified HTTP client for AWS creds if one is passed in. (#3161)

Probably fixes #3159
This commit is contained in:
Jeff Mitchell 2017-08-14 12:43:11 -04:00 committed by GitHub
parent db646c2c7a
commit e2cad8aa15

View file

@ -68,7 +68,9 @@ func (c *CredentialsConfig) GenerateCredentialChain() (*credentials.Credentials,
if c.Region != "" {
def.Config.Region = aws.String(c.Region)
}
def.Config.HTTPClient = c.HTTPClient
if c.HTTPClient != nil {
def.Config.HTTPClient = c.HTTPClient
}
providers = append(providers, defaults.RemoteCredProvider(*def.Config, def.Handlers))