diff --git a/.changeset/serious-games-study.md b/.changeset/serious-games-study.md new file mode 100644 index 000000000..4caeeedaf --- /dev/null +++ b/.changeset/serious-games-study.md @@ -0,0 +1,5 @@ +--- +'skuba': patch +--- + +template/lambda-sqs-worker\*: Bump Node.js version to 16 diff --git a/template/lambda-sqs-worker-cdk/.nvmrc b/template/lambda-sqs-worker-cdk/.nvmrc index 8351c1939..b6a7d89c6 100644 --- a/template/lambda-sqs-worker-cdk/.nvmrc +++ b/template/lambda-sqs-worker-cdk/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/template/lambda-sqs-worker-cdk/Dockerfile b/template/lambda-sqs-worker-cdk/Dockerfile index 6475878fa..795b13dd0 100644 --- a/template/lambda-sqs-worker-cdk/Dockerfile +++ b/template/lambda-sqs-worker-cdk/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.2 -FROM node:14-alpine AS dev-deps +FROM node:16-alpine AS dev-deps WORKDIR /workdir diff --git a/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap b/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap index fa53e2132..09da61056 100644 --- a/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +++ b/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap @@ -174,7 +174,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs14.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, @@ -530,7 +530,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs14.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/template/lambda-sqs-worker-cdk/infra/appStack.ts b/template/lambda-sqs-worker-cdk/infra/appStack.ts index a2aed78c2..35e1e27c3 100644 --- a/template/lambda-sqs-worker-cdk/infra/appStack.ts +++ b/template/lambda-sqs-worker-cdk/infra/appStack.ts @@ -52,7 +52,7 @@ export class AppStack extends Stack { const worker = new aws_lambda.Function(this, 'worker', { code: new aws_lambda.AssetCode('./lib'), - runtime: aws_lambda.Runtime.NODEJS_14_X, + runtime: aws_lambda.Runtime.NODEJS_16_X, handler: 'app.handler', functionName: '<%- serviceName %>', environmentEncryption: kmsKey, diff --git a/template/lambda-sqs-worker-cdk/package.json b/template/lambda-sqs-worker-cdk/package.json index 2768b8914..5bb8c066a 100644 --- a/template/lambda-sqs-worker-cdk/package.json +++ b/template/lambda-sqs-worker-cdk/package.json @@ -4,12 +4,16 @@ "runtypes": "^6.3.2" }, "devDependencies": { - "@aws-cdk/assert": "^2.3.0", + "@aws-cdk/assert": "^2.24.0", "@types/aws-lambda": "^8.10.82", - "@types/node": "^14.0.0", - "aws-cdk": "^2.3.0", - "aws-cdk-lib": "^2.3.0", - "constructs": "^10.0.17" + "@types/node": "^16.0.0", + "aws-cdk": "^2.24.0", + "aws-cdk-lib": "^2.24.0", + "constructs": "^10.0.17", + "skuba": "*" + }, + "engines": { + "node": ">=16" }, "license": "UNLICENSED", "private": true, @@ -22,11 +26,5 @@ "test": "skuba test", "test:ci": "skuba test --coverage", "test:watch": "skuba test --watch" - }, - "skuba": { - "entryPoint": "src/app.ts#handler", - "template": "lambda-sqs-worker-cdk", - "type": "application", - "version": "3.16.2" } } diff --git a/template/lambda-sqs-worker/.nvmrc b/template/lambda-sqs-worker/.nvmrc index 8351c1939..b6a7d89c6 100644 --- a/template/lambda-sqs-worker/.nvmrc +++ b/template/lambda-sqs-worker/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/template/lambda-sqs-worker/Dockerfile b/template/lambda-sqs-worker/Dockerfile index 418fcbaf9..973f24661 100644 --- a/template/lambda-sqs-worker/Dockerfile +++ b/template/lambda-sqs-worker/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.2 -FROM node:14-alpine AS dev-deps +FROM node:16-alpine AS dev-deps WORKDIR /workdir diff --git a/template/lambda-sqs-worker/package.json b/template/lambda-sqs-worker/package.json index 0b457ad1c..49ada13a5 100644 --- a/template/lambda-sqs-worker/package.json +++ b/template/lambda-sqs-worker/package.json @@ -10,16 +10,16 @@ "devDependencies": { "@types/aws-lambda": "^8.10.84", "@types/chance": "^1.1.3", - "@types/node": "^14.0.0", + "@types/node": "^16.0.0", "chance": "^1.1.8", "pino-pretty": "^7.1.0", - "serverless": "^3.0.0", + "serverless": "^3.17.0", "serverless-plugin-canary-deployments": "^0.8.0", "serverless-prune-plugin": "^2.0.0", "skuba": "*" }, "engines": { - "node": ">=14" + "node": ">=16" }, "license": "UNLICENSED", "private": true, diff --git a/template/lambda-sqs-worker/serverless.yml b/template/lambda-sqs-worker/serverless.yml index f06658231..9807027c0 100644 --- a/template/lambda-sqs-worker/serverless.yml +++ b/template/lambda-sqs-worker/serverless.yml @@ -25,11 +25,10 @@ provider: logRetentionInDays: 30 name: aws region: ap-southeast-2 - runtime: nodejs14.x + runtime: nodejs16.x architecture: arm64 stackName: ${self:service} stage: ${env:ENVIRONMENT} - versionFunctions: true deploymentBucket: # Use a shared account-level bucket for Lambda bundles and other artefacts. # This is easier to manage in terms of access, deployment, and tagging.