Skip to content

Commit

Permalink
Merge pull request #937 from pwagener/master
Browse files Browse the repository at this point in the history
Fix #490: Connection timed out after 120000ms in function deployment
  • Loading branch information
austencollins committed Apr 6, 2016
2 parents bd0482f + 9750d82 commit e2df96b
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit e2df96b

Please sign in to comment.