Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2df96b

Browse files
committed
Merge pull request #937 from pwagener/master
Fix #490: Connection timed out after 120000ms in function deployment
2 parents bd0482f + 9750d82 commit e2df96b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/ProviderAws.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ module.exports = function(S) {
3232
AWS.config.httpOptions.agent = new httpsProxyAgent(proxyOptions);
3333
}
3434

35+
// Configure the AWS Client timeout (Optional). The default is 120000 (2 minutes)
36+
let timeout = process.env.AWS_CLIENT_TIMEOUT || process.env.aws_client_timeout;
37+
if (timeout) {
38+
AWS.config.httpOptions.timeout = parseInt(timeout, 10);
39+
}
40+
3541
// Detect Profile Prefix. Useful for multiple projects (e.g., myproject_prod)
3642
this._config.profilePrefix = process.env['AWS_PROFILE_PREFIX'] ? process.env['AWS_PROFILE_PREFIX'] : null;
3743
if (this._config.profilePrefix && this._config.profilePrefix.charAt(this._config.profilePrefix.length - 1) !== '_') {

0 commit comments

Comments
 (0)