We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b50b38d commit fcf47efCopy full SHA for fcf47ef
15 files changed
samcli/commands/build/command.py
@@ -60,7 +60,7 @@
60
2. Nodejs 24.x, 22.x, 20.x, 18.x, 16.x, 14.x, 12.x using NPM\n
61
3. Ruby 3.2, 3.3, 3.4 using Bundler\n
62
4. Java 8, Java 11, Java 17, Java 21, Java 25 using Gradle and Maven\n
63
- 5. Dotnet8, Dotnet6 using Dotnet CLI\n
+ 5. Dotnet6, Dotnet8, Dotnet10 using Dotnet CLI\n
64
6. Go 1.x using Go Modules (without --use-container)\n
65
"""
66
samcli/lib/build/workflow_config.py
@@ -108,6 +108,7 @@ def get_layer_subfolder(build_workflow: str) -> str:
108
"java25": "java",
109
"dotnet6": "dotnet",
110
"dotnet8": "dotnet",
111
+ "dotnet10": "dotnet",
112
# User is responsible for creating subfolder in these workflows
113
"makefile": "",
114
}
@@ -174,6 +175,7 @@ def get_workflow_config(
174
175
"ruby3.4": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG),
176
"dotnet6": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
177
"dotnet8": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
178
+ "dotnet10": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG),
179
"go1.x": BasicWorkflowSelector(GO_MOD_CONFIG),
180
# When Maven builder exists, add to this list so we can automatically choose a builder based on the supported
181
# manifest
samcli/lib/utils/architecture.py
@@ -38,6 +38,7 @@
38
"go1.x": [X86_64],
39
"dotnet6": [ARM64, X86_64],
40
"dotnet8": [ARM64, X86_64],
41
+ "dotnet10": [ARM64, X86_64],
42
"provided": [X86_64],
43
"provided.al2": [ARM64, X86_64],
44
"provided.al2023": [ARM64, X86_64],
samcli/local/common/runtime_template.py
@@ -48,7 +48,7 @@
48
],
49
"dotnet": [
50
{
51
- "runtimes": ["dotnet8", "dotnet6"],
+ "runtimes": ["dotnet10", "dotnet8", "dotnet6"],
52
"dependency_manager": "cli-package",
53
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-dotnet"),
54
"build": True,
@@ -107,6 +107,7 @@ def get_local_lambda_images_location(mapping, runtime):
107
# Runtimes are ordered in alphabetical fashion with reverse version order (latest versions first)
INIT_RUNTIMES = [
# dotnet runtimes in descending order
+ "dotnet10",
"dotnet8",
"dotnet6",
# go runtimes in descending order
@@ -143,6 +144,7 @@ def get_local_lambda_images_location(mapping, runtime):
143
144
145
146
LAMBDA_IMAGES_RUNTIMES_MAP = {
147
+ "dotnet10": "amazon/dotnet10-base",
148
"dotnet8": "amazon/dotnet8-base",
149
"dotnet6": "amazon/dotnet6-base",
150
"go1.x": "amazon/go1.x-base",
@@ -190,6 +192,7 @@ def get_local_lambda_images_location(mapping, runtime):
190
192
"python3.14": "Python36",
191
193
"dotnet6": "dotnet6",
194
"dotnet8": "dotnet6",
195
+ "dotnet10": "dotnet6",
196
"go1.x": "Go1",
197
"provided.al2": "Go1",
198
samcli/local/docker/lambda_debug_settings.py
@@ -111,6 +111,10 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime
entry + ["/var/runtime/bootstrap"] + debug_args_list,
container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars},
),
+ Runtime.dotnet10.value: lambda: DebugSettings(
115
+ entry + ["/var/runtime/bootstrap"] + debug_args_list,
116
+ container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars},
117
+ ),
118
Runtime.go1x.value: lambda: DebugSettings(
119
entry,
120
container_env_vars={
samcli/local/docker/lambda_image.py
@@ -64,6 +64,7 @@ class Runtime(Enum):
go1x = "go1.x"
dotnet6 = "dotnet6"
dotnet8 = "dotnet8"
67
+ dotnet10 = "dotnet10"
68
provided = "provided"
69
providedal2 = "provided.al2"
70
providedal2023 = "provided.al2023"
schema/samcli.json
tests/integration/buildcmd/test_build_cmd_dotnet.py
@@ -90,6 +90,10 @@ def test_dotnet_6(self, runtime, code_uri, mode, mount_mode):
90
("dotnet8", "Dotnet8", None, MountMode.WRITE),
91
("dotnet8", "Dotnet8", "debug", None),
92
("dotnet8", "Dotnet8", "debug", MountMode.WRITE),
93
+ ("dotnet10", "Dotnet10", None, None),
94
+ ("dotnet10", "Dotnet10", None, MountMode.WRITE),
95
+ ("dotnet10", "Dotnet10", "debug", None),
96
+ ("dotnet10", "Dotnet10", "debug", MountMode.WRITE),
97
]
98
)
99
@skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE)
@@ -151,6 +155,8 @@ def test_dotnet_6_in_container(self, runtime, code_uri, mode):
151
155
[
152
156
("dotnet8", "Dotnet8", None),
153
157
("dotnet8", "Dotnet8", "debug"),
158
+ ("dotnet10", "Dotnet10", None),
159
+ ("dotnet10", "Dotnet10", "debug"),
154
160
161
162
tests/integration/testdata/buildcmd/Dotnet10/HelloWorld.csproj
@@ -0,0 +1,15 @@
1
+<Project Sdk="Microsoft.NET.Sdk">
2
+
3
+ <PropertyGroup>
4
+ <TargetFramework>net8.0</TargetFramework>
5
+ <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
6
+ </PropertyGroup>
7
8
+ <ItemGroup>
9
+ <PackageReference Include="Amazon.Lambda.Core" Version="2.2.0" />
10
+ <PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="2.7.0" />
11
+ <PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.2.0" />
12
+ <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
13
+ </ItemGroup>
14
15
+</Project>
tests/integration/testdata/buildcmd/Dotnet10/Program.cs
@@ -0,0 +1,36 @@
+using Amazon.Lambda.Core;
+using Amazon.Lambda.APIGatewayEvents;
+// Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class.
+[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
+namespace HelloWorld
+{
+ public class Function
+ {
+ public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context)
+ return "{'message': 'Hello World'}";
16
+ }
17
18
19
+ public class FirstFunction
20
21
22
23
24
+ return "Hello World";
25
26
27
28
+ public class SecondFunction
29
30
31
32
33
+ return "Hello Mars";
34
35
36
+}
0 commit comments