diff --git a/README.md b/README.md index d9a046d3..7f695838 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ AWS_MEMORY_SIZE // (default: 128) AWS_TIMEOUT // (default: 60) AWS_RUN_TIMEOUT // (default: 3) AWS_DESCRIPTION // (default: package.json.description or '') -AWS_RUNTIME // (default: 'nodejs6.10') +AWS_RUNTIME // (default: 'nodejs8.10') AWS_PUBLISH // (default: false) AWS_FUNCTION_VERSION // (default: '') AWS_VPC_SUBNETS // (default: '') @@ -111,7 +111,7 @@ Options: -h, --help output usage information -H, --handler [index.handler] Lambda Handler {index.handler} -j, --eventFile [event.json] Event JSON File - -u, --runtime [nodejs6.10] Lambda Runtime + -u, --runtime [nodejs8.10] Lambda Runtime -t, --timeout [3] Lambda Timeout -f, --configFile [] Path to file holding secret environment variables (e.g. "deploy.env") -x, --contextFile [context.json] Context JSON File @@ -168,7 +168,7 @@ Options: -m, --memorySize [128] Lambda Memory Size -t, --timeout [3] Lambda Timeout -d, --description [missing] Lambda Description - -u, --runtime [nodejs6.10] Lambda Runtime + -u, --runtime [nodejs8.10] Lambda Runtime -p, --publish [false] Lambda Publish -L, --lambdaVersion [] Lambda Function Version -b, --vpcSubnets [] Lambda Function VPC Subnets @@ -195,7 +195,7 @@ AWS Lambda will let you set environment variables for your function. Use the sam ## Node.js Runtime Configuration -AWS Lambda now supports Node.js 6.10 and Node.js 4.3. Please also check the [Programming Model (Node.js)](http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) page. +AWS Lambda now supports Node.js 8.10, 6.10 and Node.js 4.3. Please also check the [Programming Model (Node.js)](http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) page. ## Post install script When running `node-lambda deploy` if you need to do some action after `npm install --production` and before deploying to AWS Lambda (e.g. replace some modules with precompiled ones or download some libraries, replace some config file depending on environment) you can create `post_install.sh` script. If the file exists the script will be executed (and output shown after execution) if not it is skipped. Environment string is passed to script as first parameter so you can use it if needed. Make sure that the script is executable. diff --git a/bin/node-lambda b/bin/node-lambda index ee8d300d..d562b425 100755 --- a/bin/node-lambda +++ b/bin/node-lambda @@ -30,7 +30,7 @@ const AWS_MEMORY_SIZE = process.env.AWS_MEMORY_SIZE || 128 const AWS_TIMEOUT = process.env.AWS_TIMEOUT || 60 const AWS_RUN_TIMEOUT = process.env.AWS_RUN_TIMEOUT || 3 const AWS_DESCRIPTION = process.env.AWS_DESCRIPTION || packageJson.description || '' -const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs6.10' +const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs8.10' const AWS_PUBLISH = process.env.AWS_PUBLISH || false const AWS_FUNCTION_VERSION = process.env.AWS_FUNCTION_VERSION || '' const AWS_VPC_SUBNETS = process.env.AWS_VPC_SUBNETS || '' diff --git a/lib/main.js b/lib/main.js index 67c5f339..f1fcf989 100644 --- a/lib/main.js +++ b/lib/main.js @@ -52,7 +52,7 @@ event_sources.json and ${program.eventFile} files as needed.`) } run (program) { - if (['nodejs4.3', 'nodejs6.10'].indexOf(program.runtime) === -1) { + if (['nodejs4.3', 'nodejs6.10', 'nodejs8.10'].indexOf(program.runtime) === -1) { console.error(`Runtime [${program.runtime}] is not supported.`) process.exit(254) } diff --git a/test/main.js b/test/main.js index fad67b1f..05fe599a 100644 --- a/test/main.js +++ b/test/main.js @@ -21,7 +21,7 @@ const originalProgram = { memorySize: 128, timeout: 3, description: '', - runtime: 'nodejs6.10', + runtime: 'nodejs8.10', deadLetterConfigTargetArn: '', tracingConfig: '', retentionInDays: 30,