Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Look for AWS_CLIENT_TIMEOUT in the environment to set AWS.config.http…
…Options.timeout
  • Loading branch information
pwagener committed Apr 3, 2016
commit 9750d82ed644b882eb9206d100e147b8d02bcd5e
6 changes: 6 additions & 0 deletions lib/ProviderAws.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) !== '_') {
Expand Down