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
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
# folders that is commented below requires credentials, no need to spare time to run them
tests_config:
- name: "integ-buildcmd-arm64"
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py"
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_arm64.py"
- name: "integ-buildcmd-main"
params: "-n 2 --reruns 3 tests/integration/buildcmd/test_build_cmd_dotnet.py tests/integration/buildcmd/test_build_cmd_provided.py tests/integration/buildcmd/test_build_cmd_rust.py tests/integration/buildcmd/test_build_cmd_python.py tests/integration/buildcmd/test_build_cmd_node.py"
- name: "integ-buildcmd-java"
Expand Down Expand Up @@ -154,6 +154,7 @@ jobs:
3.11
3.12
3.13
3.14
${{ matrix.python }}
cache: 'pip'
- uses: actions/setup-go@v6
Expand All @@ -173,6 +174,7 @@ jobs:
11
17
21
25
# Install and configure Rust & Cargo Lambda
- name: Install and configure Rust & Cargo Lambda
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down Expand Up @@ -268,6 +270,7 @@ jobs:
with:
# These are the versions of Python that correspond to the supported Lambda runtimes
python-version: |
3.14
3.9
3.10
3.11
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -425,4 +425,5 @@ samcli/lib/init/templates/cookiecutter-aws-sam-hello-java-gradle/**/.gradle/
# Installer build folder
.build

.kiro
.kiro
mise.toml
2 changes: 1 addition & 1 deletion appveyor-linux-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ install:
- sh: "./aws_cli/bin/python -m pip install awscli"
- sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH"

- sh: "PATH=$PATH:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin"
- sh: "PATH=$PATH:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin:$HOME/venv3.14/bin"

# Install pytest
- sh: "python3.9 -m venv $HOME/pytest"
Expand Down
2 changes: 1 addition & 1 deletion appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ install:
- sh: "./aws_cli/bin/python -m pip install awscli"
- sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH"

- sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin"
- sh: "PATH=$PATH:$HOME/venv3.7/bin:$HOME/venv3.8/bin:$HOME/venv3.9/bin:$HOME/venv3.10/bin:$HOME/venv3.11/bin:$HOME/venv3.12/bin:$HOME/venv3.13/bin:$HOME/venv3.14/bin"

# update ca-certificates which causes failures with newest golang library
- sh: "sudo apt-get install --reinstall ca-certificates"
Expand Down
2 changes: 1 addition & 1 deletion appveyor-windows-al2023.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ install:
# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- "python --version"
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64'
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64;C:\Python314-x64'
- "node --version"
- "echo %PYTHON_HOME%"
- "echo %PATH%"
Expand Down
2 changes: 1 addition & 1 deletion appveyor-windows-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ install:

# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python38-x64;C:\Python312-x64;C:\Python313-x64'
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python38-x64;C:\Python312-x64;C:\Python313-x64;C:\Python314-x64'
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
Expand Down
2 changes: 1 addition & 1 deletion appveyor-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ install:

# Make sure the temp directory exists for Python to use.
- ps: "mkdir -Force C:\\tmp"
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64'
- 'set PATH=%PYTHON_HOME%;C:\Ruby32-x64\bin;C:\Ruby33-x64\bin;C:\Ruby34-x64\bin;%PATH%;C:\Python39-x64;C:\Python310-x64;C:\Python311-x64;C:\Python312-x64;C:\Python313-x64;C:\Python314-x64'
- "echo %PYTHON_HOME%"
- "echo %PATH%"
- "python --version"
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ filterwarnings =
default::ResourceWarning
; Ignore below warning to not fail in Python3.12. Remove once dateutil updates itself or botocore use another way to generate EPOCH
ignore::DeprecationWarning:dateutil.tz.tz:
; Ignore dateparser deprecation warnings about parsing dates without years (Python 3.13+)
ignore:.*Parsing dates involving a day of month without a year specified.*:DeprecationWarning
; The following deprecation warnings are treated as failures unless we explicitly tell pytest not to
; Remove once we no longer support python3.7
ignore::boto3.exceptions.PythonDeprecationWarning
Expand Down
4 changes: 2 additions & 2 deletions samcli/commands/build/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
\b
Supported Runtimes
------------------
1. Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 using PIP\n
1. Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 using PIP\n
2. Nodejs 22.x, Nodejs 20.x, 18.x, 16.x, 14.x, 12.x using NPM\n
3. Ruby 3.2, 3.3, 3.4 using Bundler\n
4. Java 8, Java 11, Java 17, Java 21 using Gradle and Maven\n
4. Java 8, Java 11, Java 17, Java 21, Java 25 using Gradle and Maven\n
5. Dotnet8, Dotnet6 using Dotnet CLI\n
6. Go 1.x using Go Modules (without --use-container)\n
"""
Expand Down
11 changes: 11 additions & 0 deletions samcli/lib/build/workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def get_layer_subfolder(build_workflow: str) -> str:
"python3.11": "python",
"python3.12": "python",
"python3.13": "python",
"python3.14": "python",
"nodejs4.3": "nodejs",
"nodejs6.10": "nodejs",
"nodejs8.10": "nodejs",
Expand All @@ -105,6 +106,7 @@ def get_layer_subfolder(build_workflow: str) -> str:
"java8.al2": "java",
"java17": "java",
"java21": "java",
"java25": "java",
"dotnet6": "dotnet",
"dotnet8": "dotnet",
# User is responsible for creating subfolder in these workflows
Expand Down Expand Up @@ -162,6 +164,7 @@ def get_workflow_config(
"python3.11": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.12": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.13": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"python3.14": BasicWorkflowSelector(PYTHON_PIP_CONFIG),
"nodejs16.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"nodejs18.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
"nodejs20.x": BasicWorkflowSelector(NODEJS_NPM_CONFIG),
Expand Down Expand Up @@ -206,6 +209,14 @@ def get_workflow_config(
JAVA_MAVEN_CONFIG,
]
),
"java25": ManifestWorkflowSelector(
[
# Gradle builder needs custom executable paths to find `gradlew` binary
JAVA_GRADLE_CONFIG._replace(executable_search_paths=[code_dir, project_dir]),
JAVA_KOTLIN_GRADLE_CONFIG._replace(executable_search_paths=[code_dir, project_dir]),
JAVA_MAVEN_CONFIG,
]
),
"provided": BasicWorkflowSelector(PROVIDED_MAKE_CONFIG),
"provided.al2": BasicWorkflowSelector(PROVIDED_MAKE_CONFIG),
"provided.al2023": BasicWorkflowSelector(PROVIDED_MAKE_CONFIG),
Expand Down
2 changes: 2 additions & 0 deletions samcli/lib/utils/architecture.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
"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.al2": [ARM64, X86_64],
"java11": [ARM64, X86_64],
"java17": [ARM64, X86_64],
"java21": [ARM64, X86_64],
"java25": [ARM64, X86_64],
"go1.x": [X86_64],
"dotnet6": [ARM64, X86_64],
"dotnet8": [ARM64, X86_64],
Expand Down
20 changes: 17 additions & 3 deletions samcli/local/common/runtime_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
RUNTIME_DEP_TEMPLATE_MAPPING = {
"python": [
{
"runtimes": ["python3.13", "python3.12", "python3.11", "python3.10", "python3.9", "python3.8"],
"runtimes": [
"python3.14",
"python3.13",
"python3.12",
"python3.11",
"python3.10",
"python3.9",
"python3.8",
],
"dependency_manager": "pip",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-python"),
"build": True,
Expand Down Expand Up @@ -56,13 +64,13 @@
],
"java": [
{
"runtimes": ["java11", "java8.al2", "java17", "java21"],
"runtimes": ["java11", "java8.al2", "java17", "java21", "java25"],
"dependency_manager": "maven",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-maven"),
"build": True,
},
{
"runtimes": ["java11", "java8.al2", "java17", "java21"],
"runtimes": ["java11", "java8.al2", "java17", "java21", "java25"],
"dependency_manager": "gradle",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-gradle"),
"build": True,
Expand Down Expand Up @@ -104,6 +112,7 @@ def get_local_lambda_images_location(mapping, runtime):
# go runtimes in descending order
"go1.x",
# java runtimes in descending order
"java25",
"java21",
"java17",
"java11",
Expand All @@ -118,6 +127,7 @@ def get_local_lambda_images_location(mapping, runtime):
"provided.al2",
"provided",
# python runtimes in descending order
"python3.14",
"python3.13",
"python3.12",
"python3.11",
Expand All @@ -137,6 +147,7 @@ def get_local_lambda_images_location(mapping, runtime):
"go1.x": "amazon/go1.x-base",
"go (provided.al2)": "amazon/go-provided.al2-base",
"go (provided.al2023)": "amazon/go-provided.al2023-base",
"java25": "amazon/java25-base",
"java21": "amazon/java21-base",
"java17": "amazon/java17-base",
"java11": "amazon/java11-base",
Expand All @@ -145,6 +156,7 @@ def get_local_lambda_images_location(mapping, runtime):
"nodejs20.x": "amazon/nodejs20.x-base",
"nodejs18.x": "amazon/nodejs18.x-base",
"nodejs16.x": "amazon/nodejs16.x-base",
"python3.14": "amazon/python3.14-base",
"python3.13": "amazon/python3.13-base",
"python3.12": "amazon/python3.12-base",
"python3.11": "amazon/python3.11-base",
Expand All @@ -166,12 +178,14 @@ def get_local_lambda_images_location(mapping, runtime):
"java11": "Java8",
"java17": "Java8",
"java21": "Java8",
"java25": "Java8",
"python3.8": "Python36",
"python3.9": "Python36",
"python3.10": "Python36",
"python3.11": "Python36",
"python3.12": "Python36",
"python3.13": "Python36",
"python3.14": "Python36",
"dotnet6": "dotnet6",
"dotnet8": "dotnet6",
"go1.x": "Go1",
Expand Down
14 changes: 14 additions & 0 deletions samcli/local/docker/lambda_debug_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime
**_container_env_vars,
},
),
Runtime.java25.value: lambda: DebugSettings(
entry,
container_env_vars={
"_JAVA_OPTIONS": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,"
f"address=*:{debug_port} -XX:MaxHeapSize=2834432k -XX:+UseSerialGC "
"-XX:+TieredCompilation -XX:TieredStopAtLevel=1 "
"-Djava.net.preferIPv4Stack=true" + " ".join(debug_args_list),
**_container_env_vars,
},
),
Runtime.dotnet6.value: lambda: DebugSettings(
entry + ["/var/runtime/bootstrap"] + debug_args_list,
container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars},
Expand Down Expand Up @@ -191,6 +201,10 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime
entry + ["/var/lang/bin/python3.13"] + debug_args_list + ["/var/runtime/bootstrap.py"],
container_env_vars=_container_env_vars,
),
Runtime.python314.value: lambda: DebugSettings(
entry + ["/var/lang/bin/python3.14"] + debug_args_list + ["/var/runtime/bootstrap.py"],
container_env_vars=_container_env_vars,
),
}
try:
return entrypoint_mapping[runtime]()
Expand Down
2 changes: 2 additions & 0 deletions samcli/local/docker/lambda_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ class Runtime(Enum):
python311 = "python3.11"
python312 = "python3.12"
python313 = "python3.13"
python314 = "python3.14"
ruby32 = "ruby3.2"
ruby33 = "ruby3.3"
ruby34 = "ruby3.4"
java8al2 = "java8.al2"
java11 = "java11"
java17 = "java17"
java21 = "java21"
java25 = "java25"
go1x = "go1.x"
dotnet6 = "dotnet6"
dotnet8 = "dotnet8"
Expand Down
Loading
Loading