From 9750d82ed644b882eb9206d100e147b8d02bcd5e Mon Sep 17 00:00:00 2001 From: pwagener Date: Sun, 3 Apr 2016 09:21:54 -0400 Subject: [PATCH] Look for AWS_CLIENT_TIMEOUT in the environment to set AWS.config.httpOptions.timeout --- lib/ProviderAws.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ProviderAws.js b/lib/ProviderAws.js index 6bd810304..19ba244dc 100644 --- a/lib/ProviderAws.js +++ b/lib/ProviderAws.js @@ -32,6 +32,12 @@ module.exports = function(S) { AWS.config.httpOptions.agent = new httpsProxyAgent(proxyOptions); } + // Configure the AWS Client timeout (Optional). The default is 120000 (2 minutes) + let timeout = process.env.AWS_CLIENT_TIMEOUT || process.env.aws_client_timeout; + if (timeout) { + AWS.config.httpOptions.timeout = parseInt(timeout, 10); + } + // Detect Profile Prefix. Useful for multiple projects (e.g., myproject_prod) this._config.profilePrefix = process.env['AWS_PROFILE_PREFIX'] ? process.env['AWS_PROFILE_PREFIX'] : null; if (this._config.profilePrefix && this._config.profilePrefix.charAt(this._config.profilePrefix.length - 1) !== '_') {