Skip to content

Commit ef80856

Browse files
committed
chore: update layers & e2e to latest cdk
1 parent 1fddfd1 commit ef80856

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

layers/src/layer-publisher-stack.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ export class LayerPublisherStack extends Stack {
3636
this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', {
3737
layerVersionName: props?.layerName,
3838
description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`,
39-
compatibleRuntimes: [Runtime.NODEJS_18_X, Runtime.NODEJS_20_X],
39+
compatibleRuntimes: [
40+
Runtime.NODEJS_18_X,
41+
Runtime.NODEJS_20_X,
42+
Runtime.NODEJS_22_X,
43+
],
4044
license: 'MIT-0',
4145
// This is needed because the following regions do not support the compatibleArchitectures property #1400
4246
// ...(![ 'eu-south-2', 'eu-central-2', 'ap-southeast-4' ].includes(Stack.of(this).region) ? { compatibleArchitectures: [Architecture.X86_64] } : {}),
4347
code: Code.fromAsset(resolve(__dirname), {
4448
bundling: {
4549
// This is here only because is required by CDK, however it is not used since the bundling is done locally
46-
image: Runtime.NODEJS_20_X.bundlingImage,
50+
image: Runtime.NODEJS_22_X.bundlingImage,
4751
// We need to run a command to generate a random UUID to force the bundling to run every time
4852
command: [`echo "${randomUUID()}"`],
4953
local: {

packages/testing/src/constants.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ import { Architecture, Runtime } from 'aws-cdk-lib/aws-lambda';
33
/**
44
* The default AWS Lambda runtime to use when none is provided.
55
*/
6-
const defaultRuntime = 'nodejs20x';
6+
const defaultRuntime = 'nodejs22x';
77

88
/**
99
* The AWS Lambda runtimes that are supported by the project.
1010
*/
1111
const TEST_RUNTIMES = {
1212
nodejs18x: Runtime.NODEJS_18_X,
13-
[defaultRuntime]: Runtime.NODEJS_20_X,
13+
nodejs20x: Runtime.NODEJS_20_X,
14+
[defaultRuntime]: Runtime.NODEJS_22_X,
1415
} as const;
1516

1617
/**

packages/testing/src/resources/TestNodejsFunction.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ class TestNodejsFunction extends NodejsFunction {
5656
logGroup,
5757
});
5858

59-
// @ts-ignore
60-
if (getRuntimeKey() === 'nodejs22x') {
61-
(this.node.defaultChild as CfnResource).addPropertyOverride(
62-
'Runtime',
63-
'nodejs22.x'
64-
);
65-
}
66-
6759
new CfnOutput(this, extraProps.nameSuffix, {
6860
value: this.functionName,
6961
});

0 commit comments

Comments
 (0)