Skip to content

Commit a8c25ef

Browse files
authored
Update lambda runtime list (#702)
1 parent b261e2d commit a8c25ef

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ AWS Lambda will let you set environment variables for your function. Use the sam
230230

231231
## Node.js Runtime Configuration
232232

233-
AWS Lambda now supports Node.js 18, Node.js 16 and Node.js 14. Please also check the [Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) page.
233+
AWS Lambda now supports Node.js 20, Node.js 18 and Node.js 16. Please also check the [Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) page.
234234

235235
## Use S3 to deploy
236236

lib/.env.example

+1-1
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=nodejs18.x
13+
AWS_RUNTIME=nodejs20.x
1414
AWS_VPC_SUBNETS=
1515
AWS_VPC_SECURITY_GROUPS=
1616
AWS_TRACING_CONFIG=

lib/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ event_sources.json and ${program.eventFile} files as needed.`)
5252
}
5353

5454
async run (program) {
55-
if (!['nodejs14.x', 'nodejs16.x', 'nodejs18.x'].includes(program.runtime)) {
55+
if (!['nodejs16.x', 'nodejs18.x', 'nodejs20.x'].includes(program.runtime)) {
5656
console.error(`Runtime [${program.runtime}] is not supported.`)
5757
process.exit(254)
5858
}

test/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const originalProgram = {
2323
memorySize: 128,
2424
timeout: 3,
2525
description: '',
26-
runtime: 'nodejs18.x',
26+
runtime: 'nodejs20.x',
2727
deadLetterConfigTargetArn: '',
2828
tracingConfig: '',
2929
Layers: '',

test/node-lambda.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('bin/node-lambda', () => {
157157
process.env.AWS_RUNTIME = 'test'
158158
})
159159
after(() => {
160-
process.env.AWS_RUNTIME = 'nodejs18.x'
160+
process.env.AWS_RUNTIME = 'nodejs20.x'
161161
})
162162

163163
it('`node-lambda run` exitCode is `254` (callback(null))', (done) => {
@@ -171,14 +171,14 @@ describe('bin/node-lambda', () => {
171171
})
172172
})
173173

174-
describe('node-lambda run (Runtime nodejs18.x is supported)', () => {
174+
describe('node-lambda run (Runtime nodejs20.x is supported)', () => {
175175
const eventObj = {
176176
asyncTest: false,
177177
callbackWaitsForEmptyEventLoop: true // True is the default value of Lambda
178178
}
179179

180180
before(() => {
181-
process.env.AWS_RUNTIME = 'nodejs18.x'
181+
process.env.AWS_RUNTIME = 'nodejs20.x'
182182
})
183183

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

0 commit comments

Comments
 (0)