Skip to content

Commit ea4a75a

Browse files
author
Dane Pilcher
authored
feat: upgrade lambda runtimes to node 22 (#3232)
This reverts commit 9c5feee.
1 parent 1ae1e00 commit ea4a75a

15 files changed

Lines changed: 20 additions & 20 deletions

File tree

packages/amplify-category-api/resources/awscloudformation/container-templates/dockercompose-rest-express/express/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/bitnami/node:18-debian-10
1+
FROM public.ecr.aws/bitnami/node:22
22

33
ENV PORT=8080
44
EXPOSE 8080

packages/amplify-category-api/resources/awscloudformation/container-templates/dockerfile-rest-express/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/bitnami/node:18-debian-10
1+
FROM public.ecr.aws/bitnami/node:22
22

33
ENV PORT=8080
44
EXPOSE 8080

packages/amplify-category-api/resources/awscloudformation/container-templates/graphql-express/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/bitnami/node:18-debian-10
1+
FROM public.ecr.aws/bitnami/node:22
22

33
WORKDIR /usr/src/app
44
COPY package*.json ./

packages/amplify-category-api/resources/awscloudformation/sync-conflict-handler/sync-conflict-handler-template.json.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
},
6868
"Role": { "Fn::GetAtt" : ["LambdaExecutionRole", "Arn"] },
69-
"Runtime": "nodejs18.x",
69+
"Runtime": "nodejs22.x",
7070
"Timeout": 25
7171
}
7272
},

packages/amplify-category-api/src/__tests__/graphql-transformer/override/__snapshots__/amplify-graphql-predictions-transformer-override.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ $utils.error($ctx.result.body)
704704
"Arn",
705705
],
706706
},
707-
"Runtime": "nodejs18.x",
707+
"Runtime": "nodejs22.x",
708708
"Timeout": 60,
709709
},
710710
"Type": "AWS::Lambda::Function",
@@ -1609,7 +1609,7 @@ $utils.error($ctx.result.body)
16091609
"Arn",
16101610
],
16111611
},
1612-
"Runtime": "nodejs18.x",
1612+
"Runtime": "nodejs22.x",
16131613
"Timeout": 60,
16141614
},
16151615
"Type": "AWS::Lambda::Function",

packages/amplify-category-api/src/__tests__/provider-utils/awscloudformation/__snapshots__/ecs-apigw-stack.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ exports.handler = async function({ RequestType, ResourceProperties, StackId }) {
12601260
"Arn",
12611261
],
12621262
},
1263-
"Runtime": "nodejs18.x",
1263+
"Runtime": "nodejs22.x",
12641264
"Timeout": 15,
12651265
},
12661266
"Type": "AWS::Lambda::Function",
@@ -1379,7 +1379,7 @@ exports.handler = async function({ RequestType, ResourceProperties, StackId }) {
13791379
"Arn",
13801380
],
13811381
},
1382-
"Runtime": "nodejs18.x",
1382+
"Runtime": "nodejs22.x",
13831383
"Timeout": 15,
13841384
},
13851385
"Type": "AWS::Lambda::Function",
@@ -2241,7 +2241,7 @@ exports.handler = async function({ 'CodePipeline.job': { id: jobId } }) {
22412241
"Arn",
22422242
],
22432243
},
2244-
"Runtime": "nodejs18.x",
2244+
"Runtime": "nodejs22.x",
22452245
"Timeout": 15,
22462246
},
22472247
"Type": "AWS::Lambda::Function",

packages/amplify-category-api/src/provider-utils/awscloudformation/pipeline-with-awaiter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type GitHubSourceActionInfo = {
2626
tokenSecretArn: string;
2727
};
2828

29-
const lambdaRuntimeNodeVersion = lambda.Runtime.NODEJS_18_X;
29+
const lambdaRuntimeNodeVersion = new lambda.Runtime('nodejs22.x', lambda.RuntimeFamily.NODEJS, { supportsInlineCode: true });
3030

3131
const lambdasDir = path.resolve(__dirname, '../../../resources/awscloudformation/lambdas');
3232

packages/amplify-graphql-model-transformer/src/resolvers/rds/resolver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
RDSSNSTopicMapping,
4343
} from '@aws-amplify/graphql-transformer-interfaces';
4444
import { Effect, IRole, Policy, PolicyStatement, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
45-
import { IFunction, LayerVersion, Runtime, Alias, Function as LambdaFunction } from 'aws-cdk-lib/aws-lambda';
45+
import { IFunction, LayerVersion, Runtime, RuntimeFamily, Alias, Function as LambdaFunction } from 'aws-cdk-lib/aws-lambda';
4646
import { Construct } from 'constructs';
4747
import { CfnVPCEndpoint } from 'aws-cdk-lib/aws-ec2';
4848
import { AwsCustomResource, AwsCustomResourcePolicy, PhysicalResourceId } from 'aws-cdk-lib/custom-resources';
@@ -159,7 +159,7 @@ export const createRdsLambda = (
159159
`functions/${resourceNames.sqlLambdaFunction}.zip`,
160160
'handler.run',
161161
path.resolve(__dirname, '..', '..', '..', 'lib', 'rds-lambda.zip'),
162-
Runtime.NODEJS_18_X,
162+
new Runtime('nodejs22.x', RuntimeFamily.NODEJS, { supportsInlineCode: true }),
163163
[LayerVersion.fromLayerVersionArn(scope, resourceNames.sqlLambdaLayerVersion, layerVersionArn)],
164164
lambdaRole,
165165
lambdaEnvironment,
@@ -334,7 +334,7 @@ export const createRdsPatchingLambda = (
334334
`functions/${resourceNames.sqlPatchingLambdaFunction}.zip`,
335335
'index.handler',
336336
path.resolve(__dirname, '..', '..', '..', 'lib', 'rds-patching-lambda.zip'),
337-
Runtime.NODEJS_18_X,
337+
new Runtime('nodejs22.x', RuntimeFamily.NODEJS, { supportsInlineCode: true }),
338338
[],
339339
lambdaRole,
340340
environment,

packages/amplify-graphql-model-transformer/src/resources/amplify-dynamodb-table/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class Provider extends Construct {
2929
const fn = new aws_lambda.Function(this, `framework-${entrypoint}`, {
3030
code: code,
3131
description: `AmplifyManagedTable - ${entrypoint} (${this.node.path})`.slice(0, 256),
32-
runtime: aws_lambda.Runtime.NODEJS_18_X,
32+
runtime: new aws_lambda.Runtime('nodejs22.x', aws_lambda.RuntimeFamily.NODEJS, { supportsInlineCode: true }),
3333
handler,
3434
timeout: Duration.minutes(14),
3535
role,

packages/amplify-graphql-name-mapping-transformer/src/field-mapping-lambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const createMappingLambda = (host: TransformHostProvider, stackManager: S
3333
`functions/${funcLogicalId}.zip`, // function key
3434
'index.handler', // function handler
3535
path.join(__dirname, 'assets', 'mapping-lambda.zip'),
36-
lambda.Runtime.NODEJS_18_X,
36+
new lambda.Runtime('nodejs22.x', lambda.RuntimeFamily.NODEJS, { supportsInlineCode: true }),
3737
undefined, // layers
3838
role, // execution role,
3939
undefined, // env vars

0 commit comments

Comments
 (0)