diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89808567964..3443b3e42e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,6 +176,9 @@ jobs: 17 21 25 + - uses: actions/setup-dotnet@v5 + with: + dotnet-version: '10.0.x' # Install and configure Rust & Cargo Lambda - name: Install and configure Rust & Cargo Lambda if: ${{ matrix.os == 'ubuntu-latest' }} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7adeace2dcf..74ee5910efe 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -173,11 +173,11 @@ jobs: mvn --version gradle --version - - name: Install .NET 8 SDK + - name: Install .NET 10 SDK if: contains(fromJSON('["build-integ-java-python-provided", "build-integ-dotnet-node-ruby", "build-integ-arm64"]'), matrix.test_suite) && matrix.container_runtime == 'no-container' || matrix.test_suite == 'other-and-e2e' uses: actions/setup-dotnet@v5 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: Set up Ruby 3.3.7 if: (contains(fromJSON('["build-integ","build-integ-dotnet-node-ruby", "build-integ-arm64"]'), matrix.test_suite) && matrix.container_runtime == 'no-container') || matrix.test_suite == 'other-and-e2e' diff --git a/samcli/commands/build/command.py b/samcli/commands/build/command.py index c052b0ea942..077fffff3c5 100644 --- a/samcli/commands/build/command.py +++ b/samcli/commands/build/command.py @@ -60,7 +60,7 @@ 2. Nodejs 24.x, 22.x, 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, Java 25 using Gradle and Maven\n - 5. Dotnet8, Dotnet6 using Dotnet CLI\n + 5. Dotnet6, Dotnet8, Dotnet10 using Dotnet CLI\n 6. Go 1.x using Go Modules (without --use-container)\n """ diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py index 64cf96beae0..32f4601754d 100644 --- a/samcli/lib/build/workflow_config.py +++ b/samcli/lib/build/workflow_config.py @@ -108,6 +108,7 @@ def get_layer_subfolder(build_workflow: str) -> str: "java25": "java", "dotnet6": "dotnet", "dotnet8": "dotnet", + "dotnet10": "dotnet", # User is responsible for creating subfolder in these workflows "makefile": "", } @@ -174,6 +175,7 @@ def get_workflow_config( "ruby3.4": BasicWorkflowSelector(RUBY_BUNDLER_CONFIG), "dotnet6": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), "dotnet8": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), + "dotnet10": BasicWorkflowSelector(DOTNET_CLIPACKAGE_CONFIG), "go1.x": BasicWorkflowSelector(GO_MOD_CONFIG), # When Maven builder exists, add to this list so we can automatically choose a builder based on the supported # manifest diff --git a/samcli/lib/utils/architecture.py b/samcli/lib/utils/architecture.py index 9ee7fb502f1..0e867576582 100644 --- a/samcli/lib/utils/architecture.py +++ b/samcli/lib/utils/architecture.py @@ -38,6 +38,7 @@ "go1.x": [X86_64], "dotnet6": [ARM64, X86_64], "dotnet8": [ARM64, X86_64], + "dotnet10": [ARM64, X86_64], "provided": [X86_64], "provided.al2": [ARM64, X86_64], "provided.al2023": [ARM64, X86_64], diff --git a/samcli/local/common/runtime_template.py b/samcli/local/common/runtime_template.py index ef66273e5e6..dd8419a36a3 100644 --- a/samcli/local/common/runtime_template.py +++ b/samcli/local/common/runtime_template.py @@ -48,7 +48,7 @@ ], "dotnet": [ { - "runtimes": ["dotnet8", "dotnet6"], + "runtimes": ["dotnet10", "dotnet8", "dotnet6"], "dependency_manager": "cli-package", "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-dotnet"), "build": True, @@ -107,6 +107,7 @@ def get_local_lambda_images_location(mapping, runtime): # 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): LAMBDA_IMAGES_RUNTIMES_MAP = { + "dotnet10": "amazon/dotnet10-base", "dotnet8": "amazon/dotnet8-base", "dotnet6": "amazon/dotnet6-base", "go1.x": "amazon/go1.x-base", @@ -190,6 +192,7 @@ def get_local_lambda_images_location(mapping, runtime): "python3.14": "Python36", "dotnet6": "dotnet6", "dotnet8": "dotnet6", + "dotnet10": "dotnet6", "go1.x": "Go1", "provided.al2": "Go1", } diff --git a/samcli/local/docker/lambda_debug_settings.py b/samcli/local/docker/lambda_debug_settings.py index 540409b7c18..d53eb63483e 100644 --- a/samcli/local/docker/lambda_debug_settings.py +++ b/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( + entry + ["/var/runtime/bootstrap"] + debug_args_list, + container_env_vars={"_AWS_LAMBDA_DOTNET_DEBUGGING": "1", **_container_env_vars}, + ), Runtime.go1x.value: lambda: DebugSettings( entry, container_env_vars={ diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py index 7e4f30fbcd2..46b24907702 100644 --- a/samcli/local/docker/lambda_image.py +++ b/samcli/local/docker/lambda_image.py @@ -64,6 +64,7 @@ class Runtime(Enum): go1x = "go1.x" dotnet6 = "dotnet6" dotnet8 = "dotnet8" + dotnet10 = "dotnet10" provided = "provided" providedal2 = "provided.al2" providedal2023 = "provided.al2023" diff --git a/schema/samcli.json b/schema/samcli.json index d6880b4d35e..4078e16c096 100644 --- a/schema/samcli.json +++ b/schema/samcli.json @@ -23,7 +23,7 @@ "properties": { "parameters": { "title": "Parameters for the init command", - "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java25-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/nodejs22.x-base, amazon/nodejs24.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.14-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base, amazon/ruby3.4-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$ sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", + "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet10, dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet10-base, amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java25-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/nodejs22.x-base, amazon/nodejs24.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.14-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base, amazon/ruby3.4-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$ sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.", "type": "object", "properties": { "no_interactive": { @@ -48,8 +48,9 @@ "runtime": { "title": "runtime", "type": "string", - "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2", + "description": "Lambda runtime for application.\n\nRuntimes: dotnet10, dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2", "enum": [ + "dotnet10", "dotnet6", "dotnet8", "go1.x", @@ -90,8 +91,9 @@ "base_image": { "title": "base_image", "type": "string", - "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java25-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/nodejs22.x-base, amazon/nodejs24.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.14-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base, amazon/ruby3.4-base", + "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet10-base, amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java25-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/nodejs22.x-base, amazon/nodejs24.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.13-base, amazon/python3.14-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base, amazon/ruby3.3-base, amazon/ruby3.4-base", "enum": [ + "amazon/dotnet10-base", "amazon/dotnet6-base", "amazon/dotnet8-base", "amazon/go-provided.al2-base", @@ -459,7 +461,7 @@ "properties": { "parameters": { "title": "Parameters for the local invoke command", - "description": "Available parameters for the local invoke command:\n* terraform_plan_file:\nUsed for passing a custom plan file when executing the Terraform hook.\n* hook_name:\nHook package id to extend AWS SAM CLI commands functionality. \n\nExample: `terraform` to extend AWS SAM CLI commands functionality to support terraform applications. \n\nAvailable Hook Names: ['terraform']\n* skip_prepare_infra:\nSkip preparation stage when there are no infrastructure changes. Only used in conjunction with --hook-name.\n* event:\nJSON file containing event data passed to the Lambda function during invoke. If this option is not specified, no event is assumed. Pass in the value '-' to input JSON via stdin\n* no_event:\nDEPRECATED: By default no event is assumed.\n* runtime:\nLambda runtime used to invoke the function.\n\nRuntimes: dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2\n* tenant_id:\nTenant ID for multi-tenant Lambda functions. Used to ensure compute isolation between different tenants. Must be 1-256 characters, the allowed characters are a-z and A-Z, numbers, spaces, and the characters _ . : / = + - @\n* durable_execution_name:\nName for the durable execution (for durable functions only).\n* mount_symlinks:\nSpecify if symlinks at the top level of the code should be mounted inside the container. Activating this flag could allow access to locations outside of your workspace by using a symbolic link. By default symlinks are not mounted.\n* template_file:\nAWS SAM template which references built artifacts for resources in the template. (if applicable)\n* env_vars:\nJSON file containing values for Lambda function's environment variables.\n* parameter_overrides:\nString that contains AWS CloudFormation parameter overrides encoded as key=value pairs.\n* debug_port:\nWhen specified, Lambda function container will start in debug mode and will expose this port on localhost.\n* debugger_path:\nHost path to a debugger that will be mounted into the Lambda container.\n* debug_args:\nAdditional arguments to be passed to the debugger.\n* container_env_vars:\nJSON file containing additional environment variables to be set within the container when used in a debugging session locally.\n* docker_volume_basedir:\nSpecify the location basedir where the SAM template exists. If Docker is running on a remote machine, Path of the SAM template must be mounted on the Docker machine and modified to match the remote machine.\n* log_file:\nFile to capture output logs.\n* layer_cache_basedir:\nSpecify the location basedir where the lambda layers used by the template will be downloaded to.\n* skip_pull_image:\nSkip pulling down the latest Docker image for Lambda runtime.\n* docker_network:\nName or ID of an existing docker network for AWS Lambda docker containers to connect to, along with the default bridge network. If not specified, the Lambda containers will only connect to the default bridge docker network.\n* force_image_build:\nForce rebuilding the image used for invoking functions with layers.\n* shutdown:\nEmulate a shutdown event after invoke completes, to test extension handling of shutdown behavior.\n* container_host:\nHost of locally emulated Lambda container. This option is useful when the container runs on a different host than AWS SAM CLI. For example, if one wants to run AWS SAM CLI in a Docker container on macOS, this option could specify `host.docker.internal`\n* container_host_interface:\nIP address of the host network interface that container ports should bind to. Use 0.0.0.0 to bind to all interfaces.\n* add_host:\nPasses a hostname to IP address mapping to the Docker container's host file. This parameter can be passed multiple times.Example:--add-host example.com:127.0.0.1\n* invoke_image:\nContainer image URIs for invoking functions or starting api and function. One can specify the image URI used for the local function invocation (--invoke-image public.ecr.aws/sam/build-nodejs20.x:latest). One can also specify for each individual function with (--invoke-image Function1=public.ecr.aws/sam/build-nodejs20.x:latest). If a function does not have invoke image specified, the default AWS SAM CLI emulation image will be used.\n* no_memory_limit:\nRemoves the Memory limit during emulation. With this parameter, the underlying container will run without a --memory parameter\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* profile:\nSelect a specific profile from your credential file to get AWS credentials.\n* region:\nSet the AWS Region of the service. (e.g. us-east-1)\n* save_params:\nSave the parameters provided via the command line to the configuration file.", + "description": "Available parameters for the local invoke command:\n* terraform_plan_file:\nUsed for passing a custom plan file when executing the Terraform hook.\n* hook_name:\nHook package id to extend AWS SAM CLI commands functionality. \n\nExample: `terraform` to extend AWS SAM CLI commands functionality to support terraform applications. \n\nAvailable Hook Names: ['terraform']\n* skip_prepare_infra:\nSkip preparation stage when there are no infrastructure changes. Only used in conjunction with --hook-name.\n* event:\nJSON file containing event data passed to the Lambda function during invoke. If this option is not specified, no event is assumed. Pass in the value '-' to input JSON via stdin\n* no_event:\nDEPRECATED: By default no event is assumed.\n* runtime:\nLambda runtime used to invoke the function.\n\nRuntimes: dotnet10, dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2\n* tenant_id:\nTenant ID for multi-tenant Lambda functions. Used to ensure compute isolation between different tenants. Must be 1-256 characters, the allowed characters are a-z and A-Z, numbers, spaces, and the characters _ . : / = + - @\n* durable_execution_name:\nName for the durable execution (for durable functions only).\n* mount_symlinks:\nSpecify if symlinks at the top level of the code should be mounted inside the container. Activating this flag could allow access to locations outside of your workspace by using a symbolic link. By default symlinks are not mounted.\n* template_file:\nAWS SAM template which references built artifacts for resources in the template. (if applicable)\n* env_vars:\nJSON file containing values for Lambda function's environment variables.\n* parameter_overrides:\nString that contains AWS CloudFormation parameter overrides encoded as key=value pairs.\n* debug_port:\nWhen specified, Lambda function container will start in debug mode and will expose this port on localhost.\n* debugger_path:\nHost path to a debugger that will be mounted into the Lambda container.\n* debug_args:\nAdditional arguments to be passed to the debugger.\n* container_env_vars:\nJSON file containing additional environment variables to be set within the container when used in a debugging session locally.\n* docker_volume_basedir:\nSpecify the location basedir where the SAM template exists. If Docker is running on a remote machine, Path of the SAM template must be mounted on the Docker machine and modified to match the remote machine.\n* log_file:\nFile to capture output logs.\n* layer_cache_basedir:\nSpecify the location basedir where the lambda layers used by the template will be downloaded to.\n* skip_pull_image:\nSkip pulling down the latest Docker image for Lambda runtime.\n* docker_network:\nName or ID of an existing docker network for AWS Lambda docker containers to connect to, along with the default bridge network. If not specified, the Lambda containers will only connect to the default bridge docker network.\n* force_image_build:\nForce rebuilding the image used for invoking functions with layers.\n* shutdown:\nEmulate a shutdown event after invoke completes, to test extension handling of shutdown behavior.\n* container_host:\nHost of locally emulated Lambda container. This option is useful when the container runs on a different host than AWS SAM CLI. For example, if one wants to run AWS SAM CLI in a Docker container on macOS, this option could specify `host.docker.internal`\n* container_host_interface:\nIP address of the host network interface that container ports should bind to. Use 0.0.0.0 to bind to all interfaces.\n* add_host:\nPasses a hostname to IP address mapping to the Docker container's host file. This parameter can be passed multiple times.Example:--add-host example.com:127.0.0.1\n* invoke_image:\nContainer image URIs for invoking functions or starting api and function. One can specify the image URI used for the local function invocation (--invoke-image public.ecr.aws/sam/build-nodejs20.x:latest). One can also specify for each individual function with (--invoke-image Function1=public.ecr.aws/sam/build-nodejs20.x:latest). If a function does not have invoke image specified, the default AWS SAM CLI emulation image will be used.\n* no_memory_limit:\nRemoves the Memory limit during emulation. With this parameter, the underlying container will run without a --memory parameter\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* profile:\nSelect a specific profile from your credential file to get AWS credentials.\n* region:\nSet the AWS Region of the service. (e.g. us-east-1)\n* save_params:\nSave the parameters provided via the command line to the configuration file.", "type": "object", "properties": { "terraform_plan_file": { @@ -491,8 +493,9 @@ "runtime": { "title": "runtime", "type": "string", - "description": "Lambda runtime used to invoke the function.\n\nRuntimes: dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2", + "description": "Lambda runtime used to invoke the function.\n\nRuntimes: dotnet10, dotnet8, dotnet6, go1.x, java25, java21, java17, java11, java8.al2, nodejs24.x, nodejs22.x, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.14, python3.13, python3.12, python3.11, python3.10, ruby3.4, ruby3.3, ruby3.2", "enum": [ + "dotnet10", "dotnet6", "dotnet8", "go1.x", diff --git a/tests/integration/buildcmd/test_build_cmd_dotnet.py b/tests/integration/buildcmd/test_build_cmd_dotnet.py index 4179b098527..364141e0a9e 100644 --- a/tests/integration/buildcmd/test_build_cmd_dotnet.py +++ b/tests/integration/buildcmd/test_build_cmd_dotnet.py @@ -90,6 +90,10 @@ def test_dotnet_6(self, runtime, code_uri, mode, mount_mode): ("dotnet8", "Dotnet8", None, MountMode.WRITE), ("dotnet8", "Dotnet8", "debug", None), ("dotnet8", "Dotnet8", "debug", MountMode.WRITE), + ("dotnet10", "Dotnet10", None, None), + ("dotnet10", "Dotnet10", None, MountMode.WRITE), + ("dotnet10", "Dotnet10", "debug", None), + ("dotnet10", "Dotnet10", "debug", MountMode.WRITE), ] ) @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): [ ("dotnet8", "Dotnet8", None), ("dotnet8", "Dotnet8", "debug"), + ("dotnet10", "Dotnet10", None), + ("dotnet10", "Dotnet10", "debug"), ] ) @skipIf(SKIP_DOCKER_TESTS or SKIP_DOCKER_BUILD, SKIP_DOCKER_MESSAGE) diff --git a/tests/integration/testdata/buildcmd/Dotnet10/HelloWorld.csproj b/tests/integration/testdata/buildcmd/Dotnet10/HelloWorld.csproj new file mode 100644 index 00000000000..1ca34ecbccd --- /dev/null +++ b/tests/integration/testdata/buildcmd/Dotnet10/HelloWorld.csproj @@ -0,0 +1,15 @@ + + + + net8.0 + true + + + + + + + + + + \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/Dotnet10/Program.cs b/tests/integration/testdata/buildcmd/Dotnet10/Program.cs new file mode 100644 index 00000000000..f841dafdf1e --- /dev/null +++ b/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'}"; + } + } + + public class FirstFunction + { + + public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) + { + return "Hello World"; + } + } + + public class SecondFunction + { + + public string FunctionHandler(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context) + { + return "Hello Mars"; + } + } +} \ No newline at end of file diff --git a/tests/integration/testdata/buildcmd/Dotnet10/aws-lambda-tools-defaults.json b/tests/integration/testdata/buildcmd/Dotnet10/aws-lambda-tools-defaults.json new file mode 100644 index 00000000000..a45c7eb6f7e --- /dev/null +++ b/tests/integration/testdata/buildcmd/Dotnet10/aws-lambda-tools-defaults.json @@ -0,0 +1,19 @@ +{ + "Information" : [ + "This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.", + "To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.", + + "dotnet lambda help", + + "All the command line options for the Lambda command can be specified in this file." + ], + + "profile":"", + "region" : "", + "configuration": "Release", + "framework": "net10.0", + "function-runtime":"dotnet10", + "function-memory-size" : 256, + "function-timeout" : 30, + "function-handler" : "HelloWorld::HelloWorld.Function::FunctionHandler" +} diff --git a/tests/integration/validate/test_validate_command.py b/tests/integration/validate/test_validate_command.py index 43805534dce..041fb95ae64 100644 --- a/tests/integration/validate/test_validate_command.py +++ b/tests/integration/validate/test_validate_command.py @@ -201,6 +201,7 @@ def test_lint_supported_runtimes(self): "Resources": {}, } supported_runtimes = [ + "dotnet10", "dotnet8", "java21", "java17", diff --git a/tests/unit/local/docker/test_lambda_container.py b/tests/unit/local/docker/test_lambda_container.py index 2d9777b2dd4..ab640527420 100644 --- a/tests/unit/local/docker/test_lambda_container.py +++ b/tests/unit/local/docker/test_lambda_container.py @@ -14,7 +14,7 @@ from samcli.local.docker.lambda_debug_settings import DebuggingNotSupported from samcli.local.docker.lambda_image import RAPID_IMAGE_TAG_PREFIX -RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnet6.value, Runtime.dotnet8.value, Runtime.go1x.value] +RUNTIMES_WITH_ENTRYPOINT = [Runtime.dotnet6.value, Runtime.dotnet8.value, Runtime.dotnet10.value, Runtime.go1x.value] RUNTIMES_WITH_BOOTSTRAP_ENTRYPOINT = [ Runtime.nodejs16x.value, @@ -31,6 +31,7 @@ Runtime.python314.value, Runtime.dotnet6.value, Runtime.dotnet8.value, + Runtime.dotnet10.value, ] RUNTIMES_WITH_DEBUG_ENV_VARS_ONLY = [ diff --git a/tests/unit/local/docker/test_lambda_debug_settings.py b/tests/unit/local/docker/test_lambda_debug_settings.py index 13eed46dd96..6433f10fc64 100644 --- a/tests/unit/local/docker/test_lambda_debug_settings.py +++ b/tests/unit/local/docker/test_lambda_debug_settings.py @@ -13,6 +13,7 @@ Runtime.java25, Runtime.dotnet6, Runtime.dotnet8, + Runtime.dotnet10, Runtime.go1x, Runtime.nodejs16x, Runtime.nodejs18x, diff --git a/tests/unit/local/docker/test_lambda_image.py b/tests/unit/local/docker/test_lambda_image.py index 04c3e7ec408..acf1364d0e5 100644 --- a/tests/unit/local/docker/test_lambda_image.py +++ b/tests/unit/local/docker/test_lambda_image.py @@ -34,6 +34,7 @@ class TestRuntime(TestCase): ("go1.x", "go:1"), ("dotnet6", "dotnet:6-x86_64"), ("dotnet8", "dotnet:8-x86_64"), + ("dotnet10", "dotnet:10-x86_64"), ("provided", "provided:alami"), ("provided.al2", "provided:al2-x86_64"), ("provided.al2023", "provided:al2023-x86_64"),