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) !== '_') {