diff --git a/README.md b/README.md index 3f34c87..e87217f 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,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 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. +AWS Lambda now supports Node.js 24, Node.js 22 and Node.js 20. Please also check the [Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) page. ## Use S3 to deploy diff --git a/lib/.env.example b/lib/.env.example index f82ec66..0892d3a 100644 --- a/lib/.env.example +++ b/lib/.env.example @@ -10,7 +10,7 @@ AWS_HANDLER=index.handler AWS_MEMORY_SIZE=128 AWS_TIMEOUT=3 AWS_DESCRIPTION= -AWS_RUNTIME=nodejs20.x +AWS_RUNTIME=nodejs24.x AWS_VPC_SUBNETS= AWS_VPC_SECURITY_GROUPS= AWS_TRACING_CONFIG= diff --git a/lib/main.js b/lib/main.js index dcf14a0..6d6a908 100644 --- a/lib/main.js +++ b/lib/main.js @@ -52,7 +52,7 @@ event_sources.json and ${program.eventFile} files as needed.`) } async run (program) { - if (!['nodejs16.x', 'nodejs18.x', 'nodejs20.x'].includes(program.runtime)) { + if (!['nodejs20.x', 'nodejs22.x', 'nodejs24.x'].includes(program.runtime)) { console.error(`Runtime [${program.runtime}] is not supported.`) process.exit(254) } diff --git a/test/main.js b/test/main.js index 647b95d..7a6a55b 100644 --- a/test/main.js +++ b/test/main.js @@ -26,7 +26,7 @@ const originalProgram = { memorySize: 128, timeout: 3, description: '', - runtime: 'nodejs20.x', + runtime: 'nodejs24.x', deadLetterConfigTargetArn: '', tracingConfig: '', Layers: '', diff --git a/test/node-lambda.js b/test/node-lambda.js index 4528653..aac8737 100644 --- a/test/node-lambda.js +++ b/test/node-lambda.js @@ -165,7 +165,7 @@ describe('bin/node-lambda', () => { process.env.AWS_RUNTIME = 'test' }) after(() => { - process.env.AWS_RUNTIME = 'nodejs20.x' + process.env.AWS_RUNTIME = 'nodejs24.x' }) it('`node-lambda run` exitCode is `254` (callback(null))', (done) => { @@ -179,14 +179,14 @@ describe('bin/node-lambda', () => { }) }) - describe('node-lambda run (Runtime nodejs20.x is supported)', () => { + describe('node-lambda run (Runtime nodejs24.x is supported)', () => { const eventObj = { asyncTest: false, callbackWaitsForEmptyEventLoop: true // True is the default value of Lambda } before(() => { - process.env.AWS_RUNTIME = 'nodejs20.x' + process.env.AWS_RUNTIME = 'nodejs24.x' }) it('`node-lambda run` exitCode is not `254` (callback(null))', (done) => {