8000 Add nodejs22.x AWS Lambda runtime by dfangl · Pull Request #11929 · localstack/localstack · GitHub
[go: up one dir, main page]

Skip to content

Add nodejs22.x AWS Lambda runtime #11929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions localstack-core/localstack/services/lambda_/runtimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# 6. Review special tests including:
# a) [ext] tests.aws.services.lambda_.test_lambda_endpoint_injection
# 7. Before merging, run the ext integration tests to cover transparent endpoint injection testing.
# 8. Add the new runtime to the K8 image build: https://github.com/localstack/lambda-cve-mitigation
# 8. Add the new runtime to the K8 image build: https://github.com/localstack/lambda-images
# 9. Inform the web team to update the resource browser (consider offering an endpoint in the future)

# Mapping from a) AWS Lambda runtime identifier => b) official AWS image on Amazon ECR Public
Expand All @@ -36,7 +36,7 @@
# => Synchronize the order with the "Supported runtimes" under "AWS Lambda runtimes" (a)
# => Add comments for deprecated runtimes using <Deprecation date> => <Block function create> => <Block function update>
IMAGE_MAPPING: dict[Runtime, str] = {
# "nodejs22.x": "nodejs:22", expected November 2024
Runtime.nodejs22_x: "nodejs:22",
Runtime.nodejs20_x: "nodejs:20",
Runtime.nodejs18_x: "nodejs:18",
Runtime.nodejs16_x: "nodejs:16",
Expand Down Expand Up @@ -111,6 +111,7 @@
# => Remove deprecated runtimes from this testing list
RUNTIMES_AGGREGATED = {
"nodejs": [
Runtime.nodejs22_x,
Runtime.nodejs20_x,
Runtime.nodejs18_x,
Runtime.nodejs16_x,
Expand Down Expand Up @@ -153,6 +154,6 @@
SNAP_START_SUPPORTED_RUNTIMES = [Runtime.java11, Runtime.java17, Runtime.java21]

# An ordered list of all Lambda runtimes considered valid by AWS. Matching snapshots in test_create_lambda_exceptions
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]"
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]"
# An ordered list of all Lambda runtimes for layers considered valid by AWS. Matching snapshots in test_layer_exceptions
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]"
51 changes: 26 additions & 25 deletions tests/aws/services/lambda_/test_lambda_api.snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -7836,7 +7836,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaFunction::test_create_lambda_exceptions": {
"recorded-date": "18-11-2024, 15:57:03",
"recorded-date": "26-11-2024, 09:27:31",
"recorded-content": {
"invalid_role_arn_exc": {
"Error": {
Expand All @@ -7851,10 +7851,10 @@
"invalid_runtime_exc": {
"Error": {
"Code": "InvalidParameterValueException",
"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"
"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"
},
"Type": "User",
"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",
"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",
"ResponseMetadata": {
"HTTPHeaders": {},
"HTTPStatusCode": 400
Expand All @@ -7863,10 +7863,10 @@
"uppercase_runtime_exc": {
"Error": {
"Code": "InvalidParameterValueException",
"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"
"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"
},
"Type": "User",
"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",
"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",
"ResponseMetadata": {
"HTTPHeaders": {},
"HTTPStatusCode": 400
Expand Down Expand Up @@ -7908,7 +7908,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaFunction::test_update_lambda_exceptions": {
"recorded-date": "18-11-2024, 15:57:06",
"recorded-date": "26-11-2024, 09:27:33",
"recorded-content": {
"invalid_role_arn_exc": {
"Error": {
Expand All @@ -7923,10 +7923,10 @@
"invalid_runtime_exc": {
"Error": {
"Code": "InvalidParameterValueException",
"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"
"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"
},
"Type": "User",
"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",
"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",
"ResponseMetadata": {
"HTTPHeaders": {},
"HTTPStatusCode": 400
Expand All @@ -7935,10 +7935,10 @@
"uppercase_runtime_exc": {
"Error": {
"Code": "InvalidParameterValueException",
"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"
"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"
},
"Type": "User",
"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",
"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",
"ResponseMetadata": {
"HTTPHeaders": {},
"HTTPStatusCode": 400
Expand Down Expand Up @@ -8248,7 +8248,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_exceptions": {
"recorded-date": "18-11-2024, 15:57:22",
"recorded-date": "26-11-2024, 09:27:46",
"recorded-content": {
"publish_result": {
"CompatibleArchitectures": [
Expand Down Expand Up @@ -8426,7 +8426,7 @@
"publish_layer_version_exc_invalid_runtime_arch": {
"Error": {
"Code": "ValidationException",
"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]]"
"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]]"
},
"ResponseMetadata": {
"HTTPHeaders": {},
Expand All @@ -8436,7 +8436,7 @@
"publish_layer_version_exc_partially_invalid_values": {
"Error": {
"Code": "ValidationException",
"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]]"
"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]]"
},
8000 "ResponseMetadata": {
"HTTPHeaders": {},
Expand Down Expand Up @@ -13759,14 +13759,15 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_compatibilities[runtimes0]": {
"recorded-date": "18-11-2024, 15:57:09",
"recorded-date": "26-11-2024, 09:27:34",
"recorded-content": {
"publish_result": {
"CompatibleArchitectures": [
"arm64",
"x86_64"
],
"CompatibleRuntimes": [
"nodejs22.x",
"nodejs20.x",
"nodejs18.x",
"nodejs16.x",
Expand All @@ -13779,8 +13780,7 @@
"python3.9",
"python3.8",
"python3.7",
"java21",
"java17"
"java21"
],
"Content": {
"CodeSha256": "<code-sha256:1>",
Expand All @@ -13800,14 +13800,15 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestLambdaLayer::test_layer_compatibilities[runtimes1]": {
"recorded-date": "18-11-2024, 15:57:14",
"recorded-date": "26-11-2024, 09:27:38",
"recorded-content": {
"publish_result": {
"CompatibleArchitectures": [
"arm64",
"x86_64"
],
"CompatibleRuntimes": [
"java17",
"java11",
"java8.al2",
"java8",
Expand Down Expand Up @@ -16304,7 +16305,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[java8]": {
"recorded-date": "18-11-2024, 15:57:00",
"recorded-date": "26-11-2024, 09:27:29",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16321,7 +16322,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[go1.x]": {
"recorded-date": "18-11-2024, 15:57:00",
"recorded-date": "26-11-2024, 09:27:29",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16338,7 +16339,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[provided]": {
"recorded-date": "18-11-2024, 15:57:01",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16355,7 +16356,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[ruby2.7]": {
"recorded-date": "18-11-2024, 15:57:01",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16372,7 +16373,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[nodejs14.x]": {
"recorded-date": "18-11-2024, 15:57:01",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16389,7 +16390,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[python3.7]": {
"recorded-date": "18-11-2024, 15:57:01",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16406,7 +16407,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[dotnetcore3.1]": {
"recorded-date": "18-11-2024, 15:57:02",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand All @@ -16423,7 +16424,7 @@
}
},
"tests/aws/services/lambda_/test_lambda_api.py::TestRuntimeValidation::test_create_deprecated_function_runtime_with_validation_enabled[nodejs12.x]": {
"recorded-date": "18-11-2024, 15:57:02",
"recorded-date": "26-11-2024, 09:27:30",
"recorded-content": {
"deprecation_error": {
"Error": {
Expand Down
Loading
Loading
0