From e2cad8aa153a918d0a118cdc099db5b3754632bc Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 14 Aug 2017 12:43:11 -0400 Subject: [PATCH] Only use specified HTTP client for AWS creds if one is passed in. (#3161) Probably fixes #3159 --- helper/awsutil/generate_credentials.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/awsutil/generate_credentials.go b/helper/awsutil/generate_credentials.go index 218191dfbcc2..6b1896832989 100644 --- a/helper/awsutil/generate_credentials.go +++ b/helper/awsutil/generate_credentials.go @@ -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))