Skip to content
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
61 changes: 12 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: make func-test

node-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / node / npm ${{ matrix.npm }}.x
name: ${{ matrix.os }} / ${{ matrix.python }} / node ${{ matrix.nodejs }} / npm ${{ matrix.npm }}.x
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -90,33 +90,32 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
npm:
- 8
- 9
- 10
- 11
nodejs:
- 20
- 22
- 24
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v6
with:
node-version: 22
node-version: ${{ matrix.nodejs }}
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
- run: make init
- run: pytest -vv tests/integration/workflows/nodejs_npm

node-esbuild-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / esbuild / npm ${{ matrix.npm }}.x
name: ${{ matrix.os }} / ${{ matrix.python }} / esbuild / node ${{ matrix.nodejs }} / npm ${{ matrix.npm }}.x
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -126,25 +125,24 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
npm:
- 8
- 9
- 10
- 11
nodejs:
- 20
- 22
- 24
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v6
with:
node-version: 22
node-version: ${{ matrix.nodejs }}
- if: ${{ matrix.npm }}
run: npm install -g npm@${{ matrix.npm }}
- run: npm --version
Expand All @@ -162,12 +160,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand All @@ -190,12 +183,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
java:
- "21"
- "25"
Expand Down Expand Up @@ -224,12 +212,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
java:
- "21"
- "25"
Expand All @@ -256,12 +239,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand Down Expand Up @@ -310,12 +288,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand All @@ -338,12 +311,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
Expand All @@ -368,12 +336,7 @@ jobs:
- ubuntu-latest
- windows-latest
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
rust:
- stable
steps:
Expand Down
67 changes: 67 additions & 0 deletions aws_lambda_builders/supported_runtimes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
"""
Centralized definition of supported AWS Lambda runtimes.

This module provides a single source of truth for all supported runtimes
across the aws-lambda-builders package.
"""

from aws_lambda_builders.architecture import ARM64, X86_64

# Node.js runtimes
NODEJS_RUNTIMES = [
"nodejs16.x",
"nodejs18.x",
"nodejs20.x",
"nodejs22.x",
"nodejs24.x",
]

# Python runtimes
PYTHON_RUNTIMES = [
"python3.8",
"python3.9",
"python3.10",
"python3.11",
"python3.12",
"python3.13",
"python3.14",
]

# Ruby runtimes
RUBY_RUNTIMES = [
"ruby3.2",
"ruby3.3",
"ruby3.4",
]

# Java runtimes
JAVA_RUNTIMES = [
"java8",
"java11",
"java17",
"java21",
"java25",
]

# Go runtimes
GO_RUNTIMES = [
"go1.x",
]

# .NET runtimes
DOTNET_RUNTIMES = [
"dotnet6",
"dotnet8",
]

# Custom runtimes
CUSTOM_RUNTIMES = ["provided", "provided.al2", "provided.al2023"]

# Combined list of all supported runtimes
ALL_RUNTIMES = (
NODEJS_RUNTIMES + PYTHON_RUNTIMES + RUBY_RUNTIMES + JAVA_RUNTIMES + GO_RUNTIMES + DOTNET_RUNTIMES + CUSTOM_RUNTIMES
)

# Runtime to architecture mapping
# All current runtimes support both ARM64 and X86_64
RUNTIME_ARCHITECTURES = {runtime: [ARM64, X86_64] for runtime in ALL_RUNTIMES}
28 changes: 1 addition & 27 deletions aws_lambda_builders/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,11 @@

import logging

from aws_lambda_builders.architecture import ARM64, X86_64
from aws_lambda_builders.exceptions import UnsupportedArchitectureError, UnsupportedRuntimeError
from aws_lambda_builders.supported_runtimes import RUNTIME_ARCHITECTURES as SUPPORTED_RUNTIMES

LOG = logging.getLogger(__name__)

SUPPORTED_RUNTIMES = {
"nodejs16.x": [ARM64, X86_64],
"nodejs18.x": [ARM64, X86_64],
"nodejs20.x": [ARM64, X86_64],
"nodejs22.x": [ARM64, X86_64],
"python3.8": [ARM64, X86_64],
"python3.9": [ARM64, X86_64],
"python3.10": [ARM64, X86_64],
"python3.11": [ARM64, X86_64],
"python3.12": [ARM64, X86_64],
"python3.13": [ARM64, X86_64],
"python3.14": [ARM64, X86_64],
"ruby3.2": [ARM64, X86_64],
"ruby3.3": [ARM64, X86_64],
"ruby3.4": [ARM64, X86_64],
"java8": [ARM64, X86_64],
"java11": [ARM64, X86_64],
"java17": [ARM64, X86_64],
"java21": [ARM64, X86_64],
"java25": [ARM64, X86_64],
"go1.x": [ARM64, X86_64],
"dotnet6": [ARM64, X86_64],
"dotnet8": [ARM64, X86_64],
"provided": [ARM64, X86_64],
}


class RuntimeValidator(object):
def __init__(self, runtime, architecture):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_with_defaults_file_arm64(self, runtime, version, test_project):

@parameterized.expand(
[
("dotnet6", "6.0", "CustomRuntime6"),
# ("dotnet6", "6.0", "CustomRuntime6"),
("dotnet8", "8.0", "CustomRuntime8"),
]
)
Expand Down
Loading
Loading