mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Look for AWS_CLIENT_TIMEOUT in the environment to set AWS.config.httpOptions.timeout
This commit is contained in:
parent
5d3553a9b5
commit
9750d82ed6
@ -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) !== '_') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user