Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ $ node-lambda deploy --help
-x, --excludeGlobs [] Add a space separated list of file(type)s to ignore (e.g. "*.json .env")
-D, --prebuiltDirectory [] Prebuilt directory
-z, --deployZipfile [] Deploy zipfile
-T, --deployTimeout [120000] Deploy Timeout
```

## Custom Environment Variables
Expand Down
2 changes: 2 additions & 0 deletions bin/node-lambda
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ var EVENT_FILE = process.env.EVENT_FILE || 'event.json';
var PACKAGE_DIRECTORY = process.env.PACKAGE_DIRECTORY;
var CONTEXT_FILE = process.env.CONTEXT_FILE || 'context.json';
var PREBUILT_DIRECTORY = process.env.PREBUILT_DIRECTORY || '';
var DEPLOY_TIMEOUT = process.env.DEPLOY_TIMEOUT || 120000;
var DOCKER_IMAGE = process.env.DOCKER_IMAGE || '';
var DEPLOY_ZIPFILE = process.env.DEPLOY_ZIPFILE || '';
var AWS_DLQ_TARGET_ARN = (function() {
Expand Down Expand Up @@ -117,6 +118,7 @@ program
.option('-x, --excludeGlobs [' + EXCLUDE_GLOBS + ']',
'Space-separated glob pattern(s) for additional exclude files (e.g. "event.json dotenv.sample")', EXCLUDE_GLOBS)
.option('-D, --prebuiltDirectory [' + PREBUILT_DIRECTORY + ']', 'Prebuilt directory', PREBUILT_DIRECTORY)
.option('-T, --deployTimeout [' + DEPLOY_TIMEOUT + ']', 'Deploy Timeout', DEPLOY_TIMEOUT)
.option('-z, --deployZipfile [' + DEPLOY_ZIPFILE + ']', 'Deploy zipfile', DEPLOY_ZIPFILE)
.action(function (prg) {
lambda.deploy(prg);
Expand Down
4 changes: 4 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@ Lambda.prototype.deploy = function (program) {
aws_security.sessionToken = program.sessionToken;
}

if (program.deployTimeout) {
aws.config.httpOptions.timeout = parseInt(program.deployTimeout);
}

aws.config.update(aws_security);

var lambda = new aws.Lambda({
Expand Down
1 change: 1 addition & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var originalProgram = {
eventFile: 'event.json',
eventSourceFile: '',
contextFile: 'context.json',
deployTimeout: 120000,
prebuiltDirectory: '',
};

Expand Down