Skip to content

Commit ce76476

Browse files
authored
feat: support nodejs14.x runtime (#553)
1 parent a7a6e91 commit ce76476

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ AWS_MEMORY_SIZE // (default: 128)
8181
AWS_TIMEOUT // (default: 60)
8282
AWS_RUN_TIMEOUT // (default: 3)
8383
AWS_DESCRIPTION // (default: package.json.description or '')
84-
AWS_RUNTIME // (default: 'nodejs12.x')
84+
AWS_RUNTIME // (default: 'nodejs14.x')
8585
AWS_PUBLISH // (default: false)
8686
AWS_FUNCTION_VERSION // (default: '')
8787
AWS_VPC_SUBNETS // (default: '')
@@ -119,7 +119,7 @@ Options:
119119
-h, --help output usage information
120120
-H, --handler [index.handler] Lambda Handler {index.handler}
121121
-j, --eventFile [event.json] Event JSON File
122-
-u, --runtime [nodejs12.x] Lambda Runtime
122+
-u, --runtime [nodejs14.x] Lambda Runtime
123123
-t, --timeout [3] Lambda Timeout
124124
-f, --configFile [] Path to file holding secret environment variables (e.g. "deploy.env")
125125
-x, --contextFile [context.json] Context JSON File
@@ -180,7 +180,7 @@ Options:
180180
-m, --memorySize [128] Lambda Memory Size
181181
-t, --timeout [3] Lambda Timeout
182182
-d, --description [missing] Lambda Description
183-
-u, --runtime [nodejs12.x] Lambda Runtime
183+
-u, --runtime [nodejs14.x] Lambda Runtime
184184
-p, --publish [false] Lambda Publish
185185
-L, --lambdaVersion [] Lambda Function Version
186186
-b, --vpcSubnets [] Lambda Function VPC Subnet IDs (comma delimited)
@@ -217,7 +217,7 @@ AWS Lambda will let you set environment variables for your function. Use the sam
217217

218218
## Node.js Runtime Configuration
219219

220-
AWS Lambda now supports Node.js 12 and Node.js 10. Please also check the [Programming Model (Node.js)](http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) page.
220+
AWS Lambda now supports Node.js14, Node.js 12 and Node.js 10. Please also check the [Building Lambda functions with Node.js](https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html) page.
221221

222222
## To deploy a container image to Lambda
223223

bin/node-lambda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const AWS_MEMORY_SIZE = process.env.AWS_MEMORY_SIZE || 128
2828
const AWS_TIMEOUT = process.env.AWS_TIMEOUT || 60
2929
const AWS_RUN_TIMEOUT = process.env.AWS_RUN_TIMEOUT || 3
3030
const AWS_DESCRIPTION = process.env.AWS_DESCRIPTION || packageJson.description || ''
31-
const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs12.x'
31+
const AWS_RUNTIME = process.env.AWS_RUNTIME || 'nodejs14.x'
3232
const AWS_PUBLISH = process.env.AWS_PUBLISH || false
3333
const AWS_FUNCTION_VERSION = process.env.AWS_FUNCTION_VERSION || ''
3434
const AWS_VPC_SUBNETS = process.env.AWS_VPC_SUBNETS || ''

lib/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ AWS_HANDLER=index.handler
1010
AWS_MEMORY_SIZE=128
1111
AWS_TIMEOUT=3
1212
AWS_DESCRIPTION=
13-
AWS_RUNTIME=nodejs12.x
13+
AWS_RUNTIME=nodejs14.x
1414
AWS_VPC_SUBNETS=
1515
AWS_VPC_SECURITY_GROUPS=
1616
AWS_TRACING_CONFIG=

lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ event_sources.json and ${program.eventFile} files as needed.`)
5151
}
5252

5353
run (program) {
54-
if (!['nodejs10.x', 'nodejs12.x'].includes(program.runtime)) {
54+
if (!['nodejs10.x', 'nodejs12.x', 'nodejs14.x'].includes(program.runtime)) {
5555
console.error(`Runtime [${program.runtime}] is not supported.`)
5656
process.exit(254)
5757
}

test/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const originalProgram = {
2020
memorySize: 128,
2121
timeout: 3,
2222
description: '',
23-
runtime: 'nodejs12.x',
23+
runtime: 'nodejs14.x',
2424
deadLetterConfigTargetArn: '',
2525
tracingConfig: '',
2626
Layers: '',

test/node-lambda.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe('bin/node-lambda', () => {
156156
process.env.AWS_RUNTIME = 'test'
157157
})
158158
after(() => {
159-
process.env.AWS_RUNTIME = 'nodejs12.x'
159+
process.env.AWS_RUNTIME = 'nodejs14.x'
160160
})
161161

162162
it('`node-lambda run` exitCode is `254` (callback(null))', (done) => {

0 commit comments

Comments
 (0)