From cf08e2836c81b4b7c9a4a908ac7b35c17f47ffe0 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Tue, 12 Apr 2016 13:26:12 +0200 Subject: [PATCH 1/4] Runhandler: Hotfixes --- lib/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/main.js b/lib/main.js index ce273096..c0f367d9 100644 --- a/lib/main.js +++ b/lib/main.js @@ -52,7 +52,7 @@ Lambda.prototype._runHandler = function (handler, event, runtime) { var callback = function (err, result) { if (err) { - console.log('Error: ' + error); + console.log('Error: ' + err); process.exit(-1); } else { @@ -67,19 +67,19 @@ Lambda.prototype._runHandler = function (handler, event, runtime) { var context = { isNode43: runtime === "nodejs4.3", succeed: function (result) { - if (isNode43) { + if (this.isNode43) { console.log('context.succeed() is deprecated with Node.js 4.3 runtime'); } callback(null, result); }, fail: function (error) { - if (isNode43) { + if (this.isNode43) { console.log('context.fail() is deprecated with Node.js 4.3 runtime'); } callback(error); }, done: function () { - if (isNode43) { + if (this.isNode43) { console.log('context.done() is deprecated with Node.js 4.3 runtime'); } callback(); From fdbbe605dbe0abf6dabe304acb05efde05466319 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Mon, 18 Apr 2016 13:17:47 +0200 Subject: [PATCH 2/4] Remove AWS_MODE --- lib/.env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/.env.example b/lib/.env.example index 66f81f71..a5a22808 100644 --- a/lib/.env.example +++ b/lib/.env.example @@ -6,7 +6,6 @@ AWS_ROLE_ARN=your_amazon_role AWS_REGION=us-east-1 AWS_FUNCTION_NAME= AWS_HANDLER=index.handler -AWS_MODE=event AWS_MEMORY_SIZE=128 AWS_TIMEOUT=3 AWS_DESCRIPTION= From 9c94a46acc15dbccc4e0307bff0a41dffbcd6616 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Mon, 18 Apr 2016 13:20:37 +0200 Subject: [PATCH 3/4] Set nodejs4.3 as default --- lib/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/.env.example b/lib/.env.example index a5a22808..1fd0bcd2 100644 --- a/lib/.env.example +++ b/lib/.env.example @@ -9,7 +9,7 @@ AWS_HANDLER=index.handler AWS_MEMORY_SIZE=128 AWS_TIMEOUT=3 AWS_DESCRIPTION= -AWS_RUNTIME=nodejs +AWS_RUNTIME=nodejs4.3 AWS_VPC_SUBNETS= AWS_VPC_SECURITY_GROUPS= EXCLUDE_GLOBS="event.json" From c44cdfb1044c86188c1a31b6ece58fc371d27a79 Mon Sep 17 00:00:00 2001 From: Chase Sillevis Date: Fri, 22 Apr 2016 17:13:53 +0200 Subject: [PATCH 4/4] Fix #88 --- bin/node-lambda | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/node-lambda b/bin/node-lambda index 54be9187..91c6a937 100755 --- a/bin/node-lambda +++ b/bin/node-lambda @@ -66,6 +66,7 @@ program .description('Create zipped package for Amazon Lambda deployment') .option('-p, --packageDirectory [' + PACKAGE_DIRECTORY + ']', 'Local Package Directory', PACKAGE_DIRECTORY) .option('-n, --functionName [' + AWS_FUNCTION_NAME + ']', 'Lambda FunctionName', AWS_FUNCTION_NAME) + .option('--handler [' + AWS_HANDLER + ']', 'Lambda Handler {index.handler}', AWS_HANDLER) .option('-e, --environment [' + AWS_ENVIRONMENT + ']', 'Choose environment {dev, staging, production}', AWS_ENVIRONMENT) .option('-f, --configFile [' + CONFIG_FILE + ']',