From dd7f847eab0ef1b421f924e3109bad333c6f6559 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 14 Aug 2017 12:42:17 -0400 Subject: [PATCH] Only use specified HTTP client for AWS creds if one is passed in. 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))