Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 720b7e2

Browse files
committed
Add nodejs22.x AWS Lambda runtime
1 parent 3a32d76 commit 720b7e2

File tree

7 files changed

+634
-286
lines changed

7 files changed

+634
-286
lines changed

localstack-core/localstack/services/lambda_/runtimes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# => Synchronize the order with the "Supported runtimes" under "AWS Lambda runtimes" (a)
3737
# => Add comments for deprecated runtimes using <Deprecation date> => <Block function create> => <Block function update>
3838
IMAGE_MAPPING: dict[Runtime, str] = {
39-
# "nodejs22.x": "nodejs:22", expected November 2024
39+
Runtime.nodejs22_x: "nodejs:22",
4040
Runtime.nodejs20_x: "nodejs:20",
4141
Runtime.nodejs18_x: "nodejs:18",
4242
Runtime.nodejs16_x: "nodejs:16",
@@ -111,6 +111,7 @@
111111
# => Remove deprecated runtimes from this testing list
112112
RUNTIMES_AGGREGATED = {
113113
"nodejs": [
114+
Runtime.nodejs22_x,
114115
Runtime.nodejs20_x,
115116
Runtime.nodejs18_x,
116117
Runtime.nodejs16_x,
@@ -153,6 +154,6 @@
153154
SNAP_START_SUPPORTED_RUNTIMES = [Runtime.java11, Runtime.java17, Runtime.java21]
154155

155156
# An ordered list of all Lambda runtimes considered valid by AWS. Matching snapshots in test_create_lambda_exceptions
156-
VALID_RUNTIMES: str = "[nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]"
157+
VALID_RUNTIMES: str = "[nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]"
157158
# An ordered list of all Lambda runtimes for layers considered valid by AWS. Matching snapshots in test_layer_exceptions
158159
VALID_LAYER_RUNTIMES: str = "[ruby2.6, dotnetcore1.0, python3.7, nodejs8.10, nasa, ruby2.7, python2.7-greengrass, dotnetcore2.0, python3.8, java21, dotnet6, dotnetcore2.1, python3.9, java11, nodejs6.10, provided, dotnetcore3.1, dotnet8, java17, nodejs, nodejs4.3, java8.al2, go1.x, nodejs20.x, go1.9, byol, nodejs10.x, provided.al2023, nodejs22.x, python3.10, java8, nodejs12.x, python3.11, nodejs8.x, python3.12, nodejs14.x, nodejs8.9, python3.13, nodejs16.x, provided.al2, nodejs4.3-edge, nodejs18.x, ruby3.2, python3.4, ruby3.3, ruby2.5, python3.6, python2.7]"

tests/aws/services/lambda_/test_lambda_api.snapshot.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7836,7 +7836,7 @@
78367836
}
78377837
},
78387838
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaFunction::test_create_lambda_exceptions": {
7839-
"recorded-date": "18-11-2024, 15:57:03",
7839+
"recorded-date": "26-11-2024, 09:27:31",
78407840
"recorded-content": {
78417841
"invalid_role_arn_exc": {
78427842
"Error": {
@@ -7851,10 +7851,10 @@
78517851
"invalid_runtime_exc": {
78527852
"Error": {
78537853
"Code": "InvalidParameterValueException",
7854-
"Message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
7854+
"Message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
78557855
},
78567856
"Type": "User",
7857-
"message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
7857+
"message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
78587858
"ResponseMetadata": {
78597859
"HTTPHeaders": {},
78607860
"HTTPStatusCode": 400
@@ -7863,10 +7863,10 @@
78637863
"uppercase_runtime_exc": {
78647864
"Error": {
78657865
"Code": "InvalidParameterValueException",
7866-
"Message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
7866+
"Message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
78677867
},
78687868
"Type": "User",
7869-
"message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
7869+
"message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
78707870
"ResponseMetadata": {
78717871
"HTTPHeaders": {},
78727872
"HTTPStatusCode": 400
@@ -7908,7 +7908,7 @@
79087908
}
79097909
},
79107910
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaFunction::test_update_lambda_exceptions": {
7911-
"recorded-date": "18-11-2024, 15:57:06",
7911+
"recorded-date": "26-11-2024, 09:27:33",
79127912
"recorded-content": {
79137913
"invalid_role_arn_exc": {
79147914
"Error": {
@@ -7923,10 +7923,10 @@
79237923
"invalid_runtime_exc": {
79247924
"Error": {
79257925
"Code": "InvalidParameterValueException",
7926-
"Message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
7926+
"Message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
79277927
},
79287928
"Type": "User",
7929-
"message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
7929+
"message": "Value non-existent-runtime at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
79307930
"ResponseMetadata": {
79317931
"HTTPHeaders": {},
79327932
"HTTPStatusCode": 400
@@ -7935,10 +7935,10 @@
79357935
"uppercase_runtime_exc": {
79367936
"Error": {
79377937
"Code": "InvalidParameterValueException",
7938-
"Message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
7938+
"Message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN"
79397939
},
79407940
"Type": "User",
7941-
"message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
7941+
"message": "Value PYTHON3.9 at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN",
79427942
"ResponseMetadata": {
79437943
"HTTPHeaders": {},
79447944
"HTTPStatusCode": 400
@@ -8248,7 +8248,7 @@
82488248
}
82498249
},
82508250
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_exceptions": {
8251-
"recorded-date": "18-11-2024, 15:57:22",
8251+
"recorded-date": "26-11-2024, 09:27:46",
82528252
"recorded-content": {
82538253
"publish_result": {
82548254
"CompatibleArchitectures": [
@@ -8426,7 +8426,7 @@
84268426
"publish_layer_version_exc_invalid_runtime_arch": {
84278427
"Error": {
84288428
"Code": "ValidationException",
8429-
"Message": "2 validation errors detected: Value '[invalidruntime]' at 'compatibleRuntimes' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]; Value '[invalidarch]' at 'compatibleArchitectures' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [x86_64, arm64]]"
8429+
"Message": "2 validation errors detected: Value '[invalidruntime]' at 'compatibleRuntimes' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]; Value '[invalidarch]' at 'compatibleArchitectures' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [x86_64, arm64]]"
84308430
},
84318431
"ResponseMetadata": {
84328432
"HTTPHeaders": {},
@@ -8436,7 +8436,7 @@
84368436
"publish_layer_version_exc_partially_invalid_values": {
84378437
"Error": {
84388438
"Code": "ValidationException",
8439-
"Message": "2 validation errors detected: Value '[invalidruntime, invalidruntime2, nodejs20.x]' at 'compatibleRuntimes' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]; Value '[invalidarch, x86_64]' at 'compatibleArchitectures' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [x86_64, arm64]]"
8439+
"Message": "2 validation errors detected: Value '[invalidruntime, invalidruntime2, nodejs20.x]' at 'compatibleRuntimes' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, python3.13, nodejs22.x, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9]; Value '[invalidarch, x86_64]' at 'compatibleArchitectures' failed to satisfy constraint: Member must satisfy constraint: [Member must satisfy enum value set: [x86_64, arm64]]"
84408440
},
84418441
"ResponseMetadata": {
84428442
"HTTPHeaders": {},
@@ -13759,14 +13759,15 @@
1375913759
}
1376013760
},
1376113761
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_compatibilities[runtimes0]": {
13762-
"recorded-date": "18-11-2024, 15:57:09",
13762+
"recorded-date": "26-11-2024, 09:27:34",
1376313763
"recorded-content": {
1376413764
"publish_result": {
1376513765
"CompatibleArchitectures": [
1376613766
"arm64",
1376713767
"x86_64"
1376813768
],
1376913769
"CompatibleRuntimes": [
13770+
"nodejs22.x",
1377013771
"nodejs20.x",
1377113772
"nodejs18.x",
1377213773
"nodejs16.x",
@@ -13779,8 +13780,7 @@
1377913780
"python3.9",
1378013781
"python3.8",
1378113782
"python3.7",
13782-
"java21",
13783-
"java17"
13783+
"java21"
1378413784
],
1378513785
"Content": {
1378613786
"CodeSha256": "<code-sha256:1>",
@@ -13800,14 +13800,15 @@
1380013800
}
1380113801
},
1380213802
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_compatibilities[runtimes1]": {
13803-
"recorded-date": "18-11-2024, 15:57:14",
13803+
"recorded-date": "26-11-2024, 09:27:38",
1380413804
"recorded-content": {
1380513805
"publish_result": {
1380613806
"CompatibleArchitectures": [
1380713807
"arm64",
1380813808
"x86_64"
1380913809
],
1381013810
"CompatibleRuntimes": [
13811+
"java17",
1381113812
"java11",
1381213813
"java8.al2",
1381313814
"java8",
@@ -16304,7 +16305,7 @@
1630416305
}
1630516306
},
1630616307
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[java8]": {
16307-
"recorded-date": "18-11-2024, 15:57:00",
16308+
"recorded-date": "26-11-2024, 09:27:29",
1630816309
"recorded-content": {
1630916310
"deprecation_error": {
1631016311
"Error": {
@@ -16321,7 +16322,7 @@
1632116322
}
1632216323
},
1632316324
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[go1.x]": {
16324-
"recorded-date": "18-11-2024, 15:57:00",
16325+
"recorded-date": "26-11-2024, 09:27:29",
1632516326
"recorded-content": {
1632616327
"deprecation_error": {
1632716328
"Error": {
@@ -16338,7 +16339,7 @@
1633816339
}
1633916340
},
1634016341
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[provided]": {
16341-
"recorded-date": "18-11-2024, 15:57:01",
16342+
"recorded-date": "26-11-2024, 09:27:30",
1634216343
"recorded-content": {
1634316344
"deprecation_error": {
1634416345
"Error": {
@@ -16355,7 +16356,7 @@
1635516356
}
1635616357
},
1635716358
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[ruby2.7]": {
16358-
"recorded-date": "18-11-2024, 15:57:01",
16359+
"recorded-date": "26-11-2024, 09:27:30",
1635916360
"recorded-content": {
1636016361
"deprecation_error": {
1636116362
"Error": {
@@ -16372,7 +16373,7 @@
1637216373
}
1637316374
},
1637416375
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[nodejs14.x]": {
16375-
"recorded-date": "18-11-2024, 15:57:01",
16376+
"recorded-date": "26-11-2024, 09:27:30",
1637616377
"recorded-content": {
1637716378
"deprecation_error": {
1637816379
"Error": {
@@ -16389,7 +16390,7 @@
1638916390
}
1639016391
},
1639116392
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[python3.7]": {
16392-
"recorded-date": "18-11-2024, 15:57:01",
16393+
"recorded-date": "26-11-2024, 09:27:30",
1639316394
"recorded-content": {
1639416395
"deprecation_error": {
1639516396
"Error": {
@@ -16406,7 +16407,7 @@
1640616407
}
1640716408
},
1640816409
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[dotnetcore3.1]": {
16409-
"recorded-date": "18-11-2024, 15:57:02",
16410+
"recorded-date": "26-11-2024, 09:27:30",
1641016411
"recorded-content": {
1641116412
"deprecation_error": {
1641216413
"Error": {
@@ -16423,7 +16424,7 @@
1642316424
}
1642416425
},
1642516426
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[nodejs12.x]": {
16426-
"recorded-date": "18-11-2024, 15:57:02",
16427+
"recorded-date": "26-11-2024, 09:27:30",
1642716428
"recorded-content": {
1642816429
"deprecation_error": {
1642916430
"Error": {

0 commit comments

Comments
 (0)