From 11839770ef14690f52291fbedcf7bb559f9b6e9f Mon Sep 17 00:00:00 2001 From: Nicolas Tarzia Date: Sun, 6 Sep 2026 16:02:47 -0300 Subject: [PATCH] chore(examples): migrate examples and docs to .NET 10 Migrate all example projects from .NET 8 (and lingering .NET 6 runtimes) to .NET 10, and add a v4 migration guide. - Bump all example .csproj TargetFramework net8.0 -> net10.0 - Update SAM templates Runtime dotnet6/dotnet8 -> dotnet10 - Update aws-lambda-tools-defaults.json function-runtime -> dotnet10 - Update container examples: Dockerfile base images repinned to real .NET 10 digests (MCR sdk 10.0, ECR Public lambda/dotnet 10.x, both multi-arch) and publish path net6.0 -> net10.0; DockerTag -> dotnet10.0-v1 - Fix Kafka Protobuf OutputDir net8.0 -> net10.0 - Update example READMEs (.NET 8.0 -> .NET 10.0, dotnet8 -> dotnet10) - Update root README dotnet badge and managed runtime text - Add docs/migration-guide-v4.md Verified: example test suites pass on net10.0 (26 tests). Idempotency integration test requires Docker (Testcontainers) and was not run locally. --- README.md | 4 +- docs/migration-guide-v4.md | 105 ++++++++++++++++++ .../src/AOT_Logging/AOT_Logging.csproj | 2 +- .../AOT/AOT_Logging/src/AOT_Logging/Readme.md | 2 +- .../aws-lambda-tools-defaults.json | 2 +- .../AOT_Logging.Tests.csproj | 2 +- .../src/AOT_Metrics/AOT_Metrics.csproj | 2 +- .../AOT/AOT_Metrics/src/AOT_Metrics/Readme.md | 2 +- .../aws-lambda-tools-defaults.json | 2 +- .../AOT_Metrics.Tests.csproj | 2 +- .../src/AOT_Tracing/AOT_Tracing.csproj | 2 +- .../AOT/AOT_Tracing/src/AOT_Tracing/Readme.md | 2 +- .../aws-lambda-tools-defaults.json | 2 +- .../AOT_Tracing.Tests.csproj | 2 +- examples/BatchProcessing/README.md | 2 +- .../BatchProcessing/src/HelloWorld/Dockerfile | 6 +- .../src/HelloWorld/HelloWorld.csproj | 2 +- examples/BatchProcessing/template.yaml | 2 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- .../src/BedrockAgentFunction.csproj | 2 +- .../src/aws-lambda-tools-defaults.json | 2 +- examples/Idempotency/README.md | 2 +- .../src/HelloWorld/HelloWorld.csproj | 2 +- examples/Idempotency/template.yaml | 2 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- examples/Kafka/Avro/src/Avro.csproj | 2 +- examples/Kafka/Avro/src/Readme.md | 2 +- .../Avro/src/aws-lambda-tools-defaults.json | 2 +- examples/Kafka/Avro/src/template.yaml | 2 +- examples/Kafka/Json/src/Json.csproj | 2 +- examples/Kafka/Json/src/Readme.md | 2 +- .../Json/src/aws-lambda-tools-defaults.json | 2 +- examples/Kafka/Json/src/template.yaml | 2 +- .../src/ProtoBufClassLibrary.csproj | 4 +- examples/Kafka/JsonClassLibrary/src/Readme.md | 4 +- .../src/aws-lambda-tools-defaults.json | 2 +- .../Kafka/JsonClassLibrary/src/template.yaml | 2 +- examples/Kafka/Protobuf/src/Protobuf.csproj | 4 +- examples/Kafka/Protobuf/src/Readme.md | 4 +- .../src/aws-lambda-tools-defaults.json | 2 +- examples/Kafka/Protobuf/src/template.yaml | 2 +- examples/Logging/README.md | 2 +- examples/Logging/src/HelloWorld/Dockerfile | 6 +- .../Logging/src/HelloWorld/HelloWorld.csproj | 2 +- examples/Logging/template-docker.yaml | 2 +- examples/Logging/template.yaml | 2 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- examples/Metrics/README.md | 2 +- examples/Metrics/src/HelloWorld/Dockerfile | 6 +- .../Metrics/src/HelloWorld/HelloWorld.csproj | 2 +- examples/Metrics/template-docker.yaml | 2 +- examples/Metrics/template.yaml | 2 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- examples/Parameters/README.md | 2 +- .../cfn/HelloWorld.Cfn/HelloWorld.Cfn.csproj | 2 +- .../src/HelloWorld/HelloWorld.csproj | 2 +- examples/Parameters/template.yaml | 4 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- examples/ServerlessApi/Readme.md | 2 +- .../LambdaPowertoolsAPI.csproj | 2 +- .../src/LambdaPowertoolsAPI/template.yaml | 2 +- .../LambdaPowertoolsAPI.Tests.csproj | 2 +- examples/Tracing/README.md | 2 +- examples/Tracing/src/HelloWorld/Dockerfile | 6 +- .../Tracing/src/HelloWorld/HelloWorld.csproj | 2 +- examples/Tracing/template-docker.yaml | 2 +- examples/Tracing/template.yaml | 2 +- .../HelloWorld.Test/HelloWorld.Tests.csproj | 2 +- 68 files changed, 186 insertions(+), 81 deletions(-) create mode 100644 docs/migration-guide-v4.md diff --git a/README.md b/README.md index e1e080c25..d49114068 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900) [![Build](https://github.com/aws-powertools/powertools-lambda-dotnet/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/aws-powertools/powertools-lambda-dotnet/actions/workflows/build.yml) [![codecov.io](https://codecov.io/github/aws-powertools/powertools-lambda-dotnet/branch/develop/graphs/badge.svg)](https://app.codecov.io/gh/aws-powertools/powertools-lambda-dotnet) -[![dotnet support](https://img.shields.io/static/v1?label=dotnet&message=%20NET8.0&color=blue?style=flat-square&logo=dotnet)](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) +[![dotnet support](https://img.shields.io/static/v1?label=dotnet&message=%20NET10.0&color=blue?style=flat-square&logo=dotnet)](https://dotnet.microsoft.com/en-us/download/dotnet/10.0) [![NuGet Downloads](https://img.shields.io/nuget/dt/AWS.Lambda.Powertools.Logging.svg)](https://www.nuget.org/packages?q=AWS.Lambda.Powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-dotnet/badge)](https://scorecard.dev/viewer/?uri=github.com/aws-powertools/powertools-lambda-dotnet) [![Discord](https://img.shields.io/badge/Discord-Join_Community-7289da.svg)](https://discord.gg/B8zZKbbyET) @@ -90,7 +90,7 @@ The Powertools for AWS Lambda (.NET) utilities are available as NuGet packages. ## Examples -We have provided examples focused specifically on each of the utilities. Each solution comes with an AWS Serverless Application Model (AWS SAM) templates to run your functions as a Zip package using the AWS Lambda .NET 8 managed runtime; or as a container package using the AWS base images for .NET. +We have provided examples focused specifically on each of the utilities. Each solution comes with an AWS Serverless Application Model (AWS SAM) templates to run your functions as a Zip package using the AWS Lambda .NET 10 managed runtime; or as a container package using the AWS base images for .NET. * **[Logging example](examples/Logging/)** * **[Metrics example](examples/Metrics/)** diff --git a/docs/migration-guide-v4.md b/docs/migration-guide-v4.md new file mode 100644 index 000000000..d249f5839 --- /dev/null +++ b/docs/migration-guide-v4.md @@ -0,0 +1,105 @@ +--- +title: Migration Guide v4 +slug: migration-guide-v4 +description: Migration guide to upgrade to v4 (.NET 10) +--- + +# Migration Guide to v4 + +This guide will help you migrate to v4, which targets the .NET 10 LTS runtime. + +## Why upgrade + +* **.NET 10 is the current LTS release** - Generally available since November 2025 and supported until November 10, 2028. +* **.NET 8 support is ending** - .NET 8 (LTS) reaches end of support on November 10, 2026. Production applications should move to .NET 10 for the extended support window. +* **Performance and cost** - .NET 10 brings JIT and GC improvements plus expanded Native AOT support, which translate directly into faster cold starts and lower memory usage for Lambda functions. + +## Breaking Changes + +⚠️ Important: Please review these breaking changes before upgrading: + +* Requires .NET 10 - The Powertools packages and examples now target `net10.0`. +* AWS Lambda managed runtime is now `dotnet10` - Update your SAM templates and function configuration accordingly. + +> The Powertools for AWS Lambda (.NET) libraries multi-target `net8.0` and `net10.0`, so they remain compatible with .NET 8 during your transition. The examples and recommended runtime, however, now use .NET 10. + +## Upgrade Steps + +### 1. Install the .NET 10 SDK + +Download and install the .NET 10 SDK from [https://dotnet.microsoft.com/download/dotnet/10.0](https://dotnet.microsoft.com/download/dotnet/10.0). + +Verify the installation: + +```bash +dotnet --list-sdks +``` + +### 2. Update Target Framework + +Update your `.csproj` file to target .NET 10: + +**Before (v3):** +```xml + + + net8.0 + + +``` + +**After (v4):** +```xml + + + net10.0 + + +``` + +### 3. Update the Lambda Runtime + +Update your AWS SAM templates (and any function configuration) to use the `dotnet10` managed runtime: + +**Before (v3):** +```yaml +Resources: + HelloWorldFunction: + Type: AWS::Serverless::Function + Properties: + Runtime: dotnet8 +``` + +**After (v4):** +```yaml +Resources: + HelloWorldFunction: + Type: AWS::Serverless::Function + Properties: + Runtime: dotnet10 +``` + +### 4. Update Powertools Packages + +Update all Powertools package references to v4: + +```xml + + + + + +``` + +### 5. Native AOT considerations + +When publishing with Native AOT, the build OS and architecture must match the target platform (Amazon Linux 2023). The AWS tooling (AWS Toolkit for Visual Studio, the `Amazon.Lambda.Tools` .NET global tool, and the SAM CLI) performs a container build using a .NET 10 Amazon Linux 2023 build image when `PublishAot` is set to `true`. Docker is required when packaging .NET Native AOT Lambda functions on non-Amazon Linux 2023 build environments. + +### 6. Build and test + +Rebuild and run your test suite to confirm the upgrade: + +```bash +dotnet build +dotnet test +``` diff --git a/examples/AOT/AOT_Logging/src/AOT_Logging/AOT_Logging.csproj b/examples/AOT/AOT_Logging/src/AOT_Logging/AOT_Logging.csproj index 9639b3d52..b811281d9 100644 --- a/examples/AOT/AOT_Logging/src/AOT_Logging/AOT_Logging.csproj +++ b/examples/AOT/AOT_Logging/src/AOT_Logging/AOT_Logging.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable Lambda diff --git a/examples/AOT/AOT_Logging/src/AOT_Logging/Readme.md b/examples/AOT/AOT_Logging/src/AOT_Logging/Readme.md index 62a1bc67e..1d9c8151a 100644 --- a/examples/AOT/AOT_Logging/src/AOT_Logging/Readme.md +++ b/examples/AOT/AOT_Logging/src/AOT_Logging/Readme.md @@ -22,7 +22,7 @@ set to `true` to strip debugging symbols from the deployed executable to reduce When publishing with Native AOT the build OS and Architecture must match the target platform that the application will run. For AWS Lambda that target platform is Amazon Linux 2023. The AWS tooling for Lambda like the AWS Toolkit for Visual Studio, .NET Global Tool Amazon.Lambda.Tools and SAM CLI will -perform a container build using a .NET 8 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** +perform a container build using a .NET 10 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** when packaging .NET Native AOT Lambda functions on non-Amazon Linux 2023 build environments. To install docker go to https://www.docker.com/. ### Trimming diff --git a/examples/AOT/AOT_Logging/src/AOT_Logging/aws-lambda-tools-defaults.json b/examples/AOT/AOT_Logging/src/AOT_Logging/aws-lambda-tools-defaults.json index da01f0f57..e8e1f53ad 100644 --- a/examples/AOT/AOT_Logging/src/AOT_Logging/aws-lambda-tools-defaults.json +++ b/examples/AOT/AOT_Logging/src/AOT_Logging/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "AOT_Logging", diff --git a/examples/AOT/AOT_Logging/test/AOT_Logging.Tests/AOT_Logging.Tests.csproj b/examples/AOT/AOT_Logging/test/AOT_Logging.Tests/AOT_Logging.Tests.csproj index 7f59b5af4..13fa6bef4 100644 --- a/examples/AOT/AOT_Logging/test/AOT_Logging.Tests/AOT_Logging.Tests.csproj +++ b/examples/AOT/AOT_Logging/test/AOT_Logging.Tests/AOT_Logging.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable true diff --git a/examples/AOT/AOT_Metrics/src/AOT_Metrics/AOT_Metrics.csproj b/examples/AOT/AOT_Metrics/src/AOT_Metrics/AOT_Metrics.csproj index 636e83947..c9d68041a 100644 --- a/examples/AOT/AOT_Metrics/src/AOT_Metrics/AOT_Metrics.csproj +++ b/examples/AOT/AOT_Metrics/src/AOT_Metrics/AOT_Metrics.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable Lambda diff --git a/examples/AOT/AOT_Metrics/src/AOT_Metrics/Readme.md b/examples/AOT/AOT_Metrics/src/AOT_Metrics/Readme.md index 9b5076fc3..57c57b401 100644 --- a/examples/AOT/AOT_Metrics/src/AOT_Metrics/Readme.md +++ b/examples/AOT/AOT_Metrics/src/AOT_Metrics/Readme.md @@ -22,7 +22,7 @@ set to `true` to strip debugging symbols from the deployed executable to reduce When publishing with Native AOT the build OS and Architecture must match the target platform that the application will run. For AWS Lambda that target platform is Amazon Linux 2023. The AWS tooling for Lambda like the AWS Toolkit for Visual Studio, .NET Global Tool Amazon.Lambda.Tools and SAM CLI will -perform a container build using a .NET 8 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** +perform a container build using a .NET 10 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** when packaging .NET Native AOT Lambda functions on non-Amazon Linux 2023 build environments. To install docker go to https://www.docker.com/. ### Trimming diff --git a/examples/AOT/AOT_Metrics/src/AOT_Metrics/aws-lambda-tools-defaults.json b/examples/AOT/AOT_Metrics/src/AOT_Metrics/aws-lambda-tools-defaults.json index 57c8cc44b..b3a401c2c 100644 --- a/examples/AOT/AOT_Metrics/src/AOT_Metrics/aws-lambda-tools-defaults.json +++ b/examples/AOT/AOT_Metrics/src/AOT_Metrics/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "AOT_Metrics", diff --git a/examples/AOT/AOT_Metrics/test/AOT_Metrics.Tests/AOT_Metrics.Tests.csproj b/examples/AOT/AOT_Metrics/test/AOT_Metrics.Tests/AOT_Metrics.Tests.csproj index 849c62f97..66c6a7bc5 100644 --- a/examples/AOT/AOT_Metrics/test/AOT_Metrics.Tests/AOT_Metrics.Tests.csproj +++ b/examples/AOT/AOT_Metrics/test/AOT_Metrics.Tests/AOT_Metrics.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable true diff --git a/examples/AOT/AOT_Tracing/src/AOT_Tracing/AOT_Tracing.csproj b/examples/AOT/AOT_Tracing/src/AOT_Tracing/AOT_Tracing.csproj index dd428701e..2f404baae 100644 --- a/examples/AOT/AOT_Tracing/src/AOT_Tracing/AOT_Tracing.csproj +++ b/examples/AOT/AOT_Tracing/src/AOT_Tracing/AOT_Tracing.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable Lambda diff --git a/examples/AOT/AOT_Tracing/src/AOT_Tracing/Readme.md b/examples/AOT/AOT_Tracing/src/AOT_Tracing/Readme.md index 6737b3ad9..5e60a9167 100644 --- a/examples/AOT/AOT_Tracing/src/AOT_Tracing/Readme.md +++ b/examples/AOT/AOT_Tracing/src/AOT_Tracing/Readme.md @@ -22,7 +22,7 @@ set to `true` to strip debugging symbols from the deployed executable to reduce When publishing with Native AOT the build OS and Architecture must match the target platform that the application will run. For AWS Lambda that target platform is Amazon Linux 2023. The AWS tooling for Lambda like the AWS Toolkit for Visual Studio, .NET Global Tool Amazon.Lambda.Tools and SAM CLI will -perform a container build using a .NET 8 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** +perform a container build using a .NET 10 Amazon Linux 2023 build image when `PublishAot` is set to `true`. This means **docker is a requirement** when packaging .NET Native AOT Lambda functions on non-Amazon Linux 2023 build environments. To install docker go to https://www.docker.com/. ### Trimming diff --git a/examples/AOT/AOT_Tracing/src/AOT_Tracing/aws-lambda-tools-defaults.json b/examples/AOT/AOT_Tracing/src/AOT_Tracing/aws-lambda-tools-defaults.json index 840bee55b..245ba75ee 100644 --- a/examples/AOT/AOT_Tracing/src/AOT_Tracing/aws-lambda-tools-defaults.json +++ b/examples/AOT/AOT_Tracing/src/AOT_Tracing/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "AOT_Tracing", diff --git a/examples/AOT/AOT_Tracing/test/AOT_Tracing.Tests/AOT_Tracing.Tests.csproj b/examples/AOT/AOT_Tracing/test/AOT_Tracing.Tests/AOT_Tracing.Tests.csproj index e081abb19..e9c96934d 100644 --- a/examples/AOT/AOT_Tracing/test/AOT_Tracing.Tests/AOT_Tracing.Tests.csproj +++ b/examples/AOT/AOT_Tracing/test/AOT_Tracing.Tests/AOT_Tracing.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable true diff --git a/examples/BatchProcessing/README.md b/examples/BatchProcessing/README.md index de84f10b6..8e3896ff6 100644 --- a/examples/BatchProcessing/README.md +++ b/examples/BatchProcessing/README.md @@ -28,7 +28,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/BatchProcessing/src/HelloWorld/Dockerfile b/examples/BatchProcessing/src/HelloWorld/Dockerfile index 0b025f36b..c7c1527a4 100644 --- a/examples/BatchProcessing/src/HelloWorld/Dockerfile +++ b/examples/BatchProcessing/src/HelloWorld/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk@sha256:c8fdd06e430de9f4ddd066b475ea350d771f341b77dd5ff4c2fafa748e3f2ef2 AS build-image +FROM mcr.microsoft.com/dotnet/sdk@sha256:e1ffd2a92ae84c1291bc1b6887501f8af98e6331e7af6d4c8d37168c5e87a64c AS build-image ARG FUNCTION_DIR="/build" ARG SAM_BUILD_MODE="run" @@ -13,9 +13,9 @@ RUN dotnet tool install -g Amazon.Lambda.Tools # Build and Copy artifacts depending on build mode. RUN mkdir -p build_artifacts RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then dotnet lambda package --configuration Debug; else dotnet lambda package --configuration Release; fi -RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net6.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net6.0/publish/* /build/build_artifacts; fi +RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net10.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net10.0/publish/* /build/build_artifacts; fi -FROM public.ecr.aws/lambda/dotnet@sha256:ec61a7f638e2a0c86d75204117cc7710bcdc70222ffc777e3fc1458287b09834 +FROM public.ecr.aws/lambda/dotnet@sha256:6a4e0d15ca7b7fa6879155f5ceef7231a19ab099756a7e36090db2bf2fde281f COPY --from=build-image /build/build_artifacts/ /var/task/ # Command can be overwritten by providing a different command in the template directly. diff --git a/examples/BatchProcessing/src/HelloWorld/HelloWorld.csproj b/examples/BatchProcessing/src/HelloWorld/HelloWorld.csproj index fb7d9b6a6..85de2834e 100644 --- a/examples/BatchProcessing/src/HelloWorld/HelloWorld.csproj +++ b/examples/BatchProcessing/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 true enable diff --git a/examples/BatchProcessing/template.yaml b/examples/BatchProcessing/template.yaml index 17dfd20ce..e43a5b9a1 100644 --- a/examples/BatchProcessing/template.yaml +++ b/examples/BatchProcessing/template.yaml @@ -7,7 +7,7 @@ Description: Example project demoing the Batch Processing Utility in Powertools Globals: Function: Timeout: 20 - Runtime: dotnet8 + Runtime: dotnet10 MemorySize: 1024 Environment: Variables: diff --git a/examples/BatchProcessing/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/BatchProcessing/test/HelloWorld.Test/HelloWorld.Tests.csproj index 8a0be8f0a..374755c1a 100644 --- a/examples/BatchProcessing/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/BatchProcessing/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 diff --git a/examples/Event Handler/BedrockAgentFunction/src/BedrockAgentFunction.csproj b/examples/Event Handler/BedrockAgentFunction/src/BedrockAgentFunction.csproj index 5f945d9de..38ccb3b83 100644 --- a/examples/Event Handler/BedrockAgentFunction/src/BedrockAgentFunction.csproj +++ b/examples/Event Handler/BedrockAgentFunction/src/BedrockAgentFunction.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable true diff --git a/examples/Event Handler/BedrockAgentFunction/src/aws-lambda-tools-defaults.json b/examples/Event Handler/BedrockAgentFunction/src/aws-lambda-tools-defaults.json index 1dc447ae8..99ccaee0f 100644 --- a/examples/Event Handler/BedrockAgentFunction/src/aws-lambda-tools-defaults.json +++ b/examples/Event Handler/BedrockAgentFunction/src/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "BedrockAgentFunction" diff --git a/examples/Idempotency/README.md b/examples/Idempotency/README.md index 705350299..05ad89a7d 100644 --- a/examples/Idempotency/README.md +++ b/examples/Idempotency/README.md @@ -25,7 +25,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/Idempotency/src/HelloWorld/HelloWorld.csproj b/examples/Idempotency/src/HelloWorld/HelloWorld.csproj index e5492bd8a..1a22c4edf 100644 --- a/examples/Idempotency/src/HelloWorld/HelloWorld.csproj +++ b/examples/Idempotency/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable diff --git a/examples/Idempotency/template.yaml b/examples/Idempotency/template.yaml index 0de9bc885..66c508af8 100644 --- a/examples/Idempotency/template.yaml +++ b/examples/Idempotency/template.yaml @@ -18,7 +18,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler MemorySize: 256 diff --git a/examples/Idempotency/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/Idempotency/test/HelloWorld.Test/HelloWorld.Tests.csproj index a887c306b..1731b4baf 100644 --- a/examples/Idempotency/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/Idempotency/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 diff --git a/examples/Kafka/Avro/src/Avro.csproj b/examples/Kafka/Avro/src/Avro.csproj index 4795db70a..9aca5ad3b 100644 --- a/examples/Kafka/Avro/src/Avro.csproj +++ b/examples/Kafka/Avro/src/Avro.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable true diff --git a/examples/Kafka/Avro/src/Readme.md b/examples/Kafka/Avro/src/Readme.md index 8a03be1ab..95570b586 100644 --- a/examples/Kafka/Avro/src/Readme.md +++ b/examples/Kafka/Avro/src/Readme.md @@ -21,7 +21,7 @@ examples/Kafka/Avro/src/ ## Prerequisites -- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet8 or later) +- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet10 or later) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) - [AWS CLI](https://aws.amazon.com/cli/) - An AWS account with appropriate permissions diff --git a/examples/Kafka/Avro/src/aws-lambda-tools-defaults.json b/examples/Kafka/Avro/src/aws-lambda-tools-defaults.json index cd93437eb..d4cbc2fa3 100644 --- a/examples/Kafka/Avro/src/aws-lambda-tools-defaults.json +++ b/examples/Kafka/Avro/src/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "Avro.Example" diff --git a/examples/Kafka/Avro/src/template.yaml b/examples/Kafka/Avro/src/template.yaml index a08325be2..f28635ec5 100644 --- a/examples/Kafka/Avro/src/template.yaml +++ b/examples/Kafka/Avro/src/template.yaml @@ -10,7 +10,7 @@ Globals: Function: Timeout: 15 MemorySize: 512 - Runtime: dotnet8 + Runtime: dotnet10 Resources: AvroDeserializationFunction: diff --git a/examples/Kafka/Json/src/Json.csproj b/examples/Kafka/Json/src/Json.csproj index f10cb9d2d..ffdf16741 100644 --- a/examples/Kafka/Json/src/Json.csproj +++ b/examples/Kafka/Json/src/Json.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable true diff --git a/examples/Kafka/Json/src/Readme.md b/examples/Kafka/Json/src/Readme.md index c809e8124..2c200a0ae 100644 --- a/examples/Kafka/Json/src/Readme.md +++ b/examples/Kafka/Json/src/Readme.md @@ -20,7 +20,7 @@ examples/Kafka/Json/src/ ## Prerequisites -- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet8 or later) +- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet10 or later) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) - [AWS CLI](https://aws.amazon.com/cli/) - An AWS account with appropriate permissions diff --git a/examples/Kafka/Json/src/aws-lambda-tools-defaults.json b/examples/Kafka/Json/src/aws-lambda-tools-defaults.json index fb3240903..1b4a5b251 100644 --- a/examples/Kafka/Json/src/aws-lambda-tools-defaults.json +++ b/examples/Kafka/Json/src/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "Json" diff --git a/examples/Kafka/Json/src/template.yaml b/examples/Kafka/Json/src/template.yaml index dd4bfb9ff..35de11f1c 100644 --- a/examples/Kafka/Json/src/template.yaml +++ b/examples/Kafka/Json/src/template.yaml @@ -10,7 +10,7 @@ Globals: Function: Timeout: 15 MemorySize: 512 - Runtime: dotnet8 + Runtime: dotnet10 Resources: JsonDeserializationFunction: diff --git a/examples/Kafka/JsonClassLibrary/src/ProtoBufClassLibrary.csproj b/examples/Kafka/JsonClassLibrary/src/ProtoBufClassLibrary.csproj index 58d9bc1ca..d4bf78beb 100644 --- a/examples/Kafka/JsonClassLibrary/src/ProtoBufClassLibrary.csproj +++ b/examples/Kafka/JsonClassLibrary/src/ProtoBufClassLibrary.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable true @@ -33,7 +33,7 @@ Public True True - obj/Debug/net8.0/ + obj/Debug/net10.0/ MSBuild:Compile PreserveNewest diff --git a/examples/Kafka/JsonClassLibrary/src/Readme.md b/examples/Kafka/JsonClassLibrary/src/Readme.md index 9b89f72cc..e0fc7611e 100644 --- a/examples/Kafka/JsonClassLibrary/src/Readme.md +++ b/examples/Kafka/JsonClassLibrary/src/Readme.md @@ -21,7 +21,7 @@ examples/Kafka/Protobuf/src/ ## Prerequisites -- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet8 or later) +- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet10 or later) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) - [AWS CLI](https://aws.amazon.com/cli/) - An AWS account with appropriate permissions @@ -73,7 +73,7 @@ And update the `.csproj` file to include the `.proto` files. Public True True - obj\Debug/net8.0/ + obj\Debug/net10.0/ MSBuild:Compile PreserveNewest diff --git a/examples/Kafka/JsonClassLibrary/src/aws-lambda-tools-defaults.json b/examples/Kafka/JsonClassLibrary/src/aws-lambda-tools-defaults.json index d4ec43f14..6776cc477 100644 --- a/examples/Kafka/JsonClassLibrary/src/aws-lambda-tools-defaults.json +++ b/examples/Kafka/JsonClassLibrary/src/aws-lambda-tools-defaults.json @@ -9,7 +9,7 @@ "region": "", "configuration": "Release", "function-architecture": "x86_64", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "ProtoBufClassLibrary::ProtoBufClassLibrary.Function::FunctionHandler" diff --git a/examples/Kafka/JsonClassLibrary/src/template.yaml b/examples/Kafka/JsonClassLibrary/src/template.yaml index 0df5feaa2..0ec5331e5 100644 --- a/examples/Kafka/JsonClassLibrary/src/template.yaml +++ b/examples/Kafka/JsonClassLibrary/src/template.yaml @@ -10,7 +10,7 @@ Globals: Function: Timeout: 15 MemorySize: 512 - Runtime: dotnet8 + Runtime: dotnet10 Resources: ProtobufClassLibraryDeserializationFunction: diff --git a/examples/Kafka/Protobuf/src/Protobuf.csproj b/examples/Kafka/Protobuf/src/Protobuf.csproj index f9dad2680..c252159ef 100644 --- a/examples/Kafka/Protobuf/src/Protobuf.csproj +++ b/examples/Kafka/Protobuf/src/Protobuf.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable true @@ -36,7 +36,7 @@ True True - obj\Debug/net8.0/ + obj\Debug/net10.0/ MSBuild:Compile PreserveNewest diff --git a/examples/Kafka/Protobuf/src/Readme.md b/examples/Kafka/Protobuf/src/Readme.md index ed4146097..89494e3d4 100644 --- a/examples/Kafka/Protobuf/src/Readme.md +++ b/examples/Kafka/Protobuf/src/Readme.md @@ -21,7 +21,7 @@ examples/Kafka/Protobuf/src/ ## Prerequisites -- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet8 or later) +- [Dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) (dotnet10 or later) - [AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) - [AWS CLI](https://aws.amazon.com/cli/) - An AWS account with appropriate permissions @@ -73,7 +73,7 @@ And update the `.csproj` file to include the `.proto` files. Public True True - obj\Debug/net8.0/ + obj\Debug/net10.0/ MSBuild:Compile PreserveNewest diff --git a/examples/Kafka/Protobuf/src/aws-lambda-tools-defaults.json b/examples/Kafka/Protobuf/src/aws-lambda-tools-defaults.json index 1a1c5de1d..d333be7d1 100644 --- a/examples/Kafka/Protobuf/src/aws-lambda-tools-defaults.json +++ b/examples/Kafka/Protobuf/src/aws-lambda-tools-defaults.json @@ -8,7 +8,7 @@ "profile": "", "region": "", "configuration": "Release", - "function-runtime": "dotnet8", + "function-runtime": "dotnet10", "function-memory-size": 512, "function-timeout": 30, "function-handler": "Protobuf" diff --git a/examples/Kafka/Protobuf/src/template.yaml b/examples/Kafka/Protobuf/src/template.yaml index b8f7df6a5..0f3fde2da 100644 --- a/examples/Kafka/Protobuf/src/template.yaml +++ b/examples/Kafka/Protobuf/src/template.yaml @@ -10,7 +10,7 @@ Globals: Function: Timeout: 15 MemorySize: 512 - Runtime: dotnet8 + Runtime: dotnet10 Resources: ProtobufDeserializationFunction: diff --git a/examples/Logging/README.md b/examples/Logging/README.md index 85763dfe3..6072e5b2e 100644 --- a/examples/Logging/README.md +++ b/examples/Logging/README.md @@ -25,7 +25,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/Logging/src/HelloWorld/Dockerfile b/examples/Logging/src/HelloWorld/Dockerfile index 0b025f36b..c7c1527a4 100644 --- a/examples/Logging/src/HelloWorld/Dockerfile +++ b/examples/Logging/src/HelloWorld/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk@sha256:c8fdd06e430de9f4ddd066b475ea350d771f341b77dd5ff4c2fafa748e3f2ef2 AS build-image +FROM mcr.microsoft.com/dotnet/sdk@sha256:e1ffd2a92ae84c1291bc1b6887501f8af98e6331e7af6d4c8d37168c5e87a64c AS build-image ARG FUNCTION_DIR="/build" ARG SAM_BUILD_MODE="run" @@ -13,9 +13,9 @@ RUN dotnet tool install -g Amazon.Lambda.Tools # Build and Copy artifacts depending on build mode. RUN mkdir -p build_artifacts RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then dotnet lambda package --configuration Debug; else dotnet lambda package --configuration Release; fi -RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net6.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net6.0/publish/* /build/build_artifacts; fi +RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net10.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net10.0/publish/* /build/build_artifacts; fi -FROM public.ecr.aws/lambda/dotnet@sha256:ec61a7f638e2a0c86d75204117cc7710bcdc70222ffc777e3fc1458287b09834 +FROM public.ecr.aws/lambda/dotnet@sha256:6a4e0d15ca7b7fa6879155f5ceef7231a19ab099756a7e36090db2bf2fde281f COPY --from=build-image /build/build_artifacts/ /var/task/ # Command can be overwritten by providing a different command in the template directly. diff --git a/examples/Logging/src/HelloWorld/HelloWorld.csproj b/examples/Logging/src/HelloWorld/HelloWorld.csproj index 6afc39861..0c8b8a462 100644 --- a/examples/Logging/src/HelloWorld/HelloWorld.csproj +++ b/examples/Logging/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable diff --git a/examples/Logging/template-docker.yaml b/examples/Logging/template-docker.yaml index b36c4100f..fd9e6db57 100644 --- a/examples/Logging/template-docker.yaml +++ b/examples/Logging/template-docker.yaml @@ -32,7 +32,7 @@ Resources: Path: /hello Method: get Metadata: - DockerTag: dotnet6.0-v1 + DockerTag: dotnet10.0-v1 DockerContext: ./src/HelloWorld Dockerfile: Dockerfile DockerBuildArgs: diff --git a/examples/Logging/template.yaml b/examples/Logging/template.yaml index 36649f023..5d04aa82e 100644 --- a/examples/Logging/template.yaml +++ b/examples/Logging/template.yaml @@ -19,7 +19,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler MemorySize: 256 diff --git a/examples/Logging/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/Logging/test/HelloWorld.Test/HelloWorld.Tests.csproj index 3795da8d5..aa6cd7db3 100644 --- a/examples/Logging/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/Logging/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 diff --git a/examples/Metrics/README.md b/examples/Metrics/README.md index d3b483c3f..a637a8532 100644 --- a/examples/Metrics/README.md +++ b/examples/Metrics/README.md @@ -25,7 +25,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/Metrics/src/HelloWorld/Dockerfile b/examples/Metrics/src/HelloWorld/Dockerfile index 932a2740c..c2cb448f6 100644 --- a/examples/Metrics/src/HelloWorld/Dockerfile +++ b/examples/Metrics/src/HelloWorld/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk@sha256:c8fdd06e430de9f4ddd066b475ea350d771f341b77dd5ff4c2fafa748e3f2ef2 AS build-image +FROM mcr.microsoft.com/dotnet/sdk@sha256:e1ffd2a92ae84c1291bc1b6887501f8af98e6331e7af6d4c8d37168c5e87a64c AS build-image ARG FUNCTION_DIR="/build" ARG SAM_BUILD_MODE="run" @@ -14,9 +14,9 @@ RUN dotnet tool install -g Amazon.Lambda.Tools # Build and Copy artifacts depending on build mode. RUN mkdir -p build_artifacts RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then dotnet lambda package --configuration Debug; else dotnet lambda package --configuration Release; fi -RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net6.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net6.0/publish/* /build/build_artifacts; fi +RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net10.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net10.0/publish/* /build/build_artifacts; fi -FROM public.ecr.aws/lambda/dotnet@sha256:ec61a7f638e2a0c86d75204117cc7710bcdc70222ffc777e3fc1458287b09834 +FROM public.ecr.aws/lambda/dotnet@sha256:6a4e0d15ca7b7fa6879155f5ceef7231a19ab099756a7e36090db2bf2fde281f COPY --from=build-image /build/build_artifacts/ /var/task/ # Command can be overwritten by providing a different command in the template directly. diff --git a/examples/Metrics/src/HelloWorld/HelloWorld.csproj b/examples/Metrics/src/HelloWorld/HelloWorld.csproj index ad283a004..51fef8cf0 100644 --- a/examples/Metrics/src/HelloWorld/HelloWorld.csproj +++ b/examples/Metrics/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable diff --git a/examples/Metrics/template-docker.yaml b/examples/Metrics/template-docker.yaml index f189aafe2..426d77e8c 100644 --- a/examples/Metrics/template-docker.yaml +++ b/examples/Metrics/template-docker.yaml @@ -33,7 +33,7 @@ Resources: Path: /hello Method: get Metadata: - DockerTag: dotnet6.0-v1 + DockerTag: dotnet10.0-v1 DockerContext: ./src/HelloWorld Dockerfile: Dockerfile DockerBuildArgs: diff --git a/examples/Metrics/template.yaml b/examples/Metrics/template.yaml index 3df103f4e..6b4e6a2fc 100644 --- a/examples/Metrics/template.yaml +++ b/examples/Metrics/template.yaml @@ -20,7 +20,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler MemorySize: 256 diff --git a/examples/Metrics/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/Metrics/test/HelloWorld.Test/HelloWorld.Tests.csproj index 3795da8d5..aa6cd7db3 100644 --- a/examples/Metrics/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/Metrics/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 diff --git a/examples/Parameters/README.md b/examples/Parameters/README.md index abd731057..cf4c19bc0 100644 --- a/examples/Parameters/README.md +++ b/examples/Parameters/README.md @@ -25,7 +25,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/Parameters/cfn/HelloWorld.Cfn/HelloWorld.Cfn.csproj b/examples/Parameters/cfn/HelloWorld.Cfn/HelloWorld.Cfn.csproj index 80d717cc4..d62dd1841 100644 --- a/examples/Parameters/cfn/HelloWorld.Cfn/HelloWorld.Cfn.csproj +++ b/examples/Parameters/cfn/HelloWorld.Cfn/HelloWorld.Cfn.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable HelloWorld.Cfn diff --git a/examples/Parameters/src/HelloWorld/HelloWorld.csproj b/examples/Parameters/src/HelloWorld/HelloWorld.csproj index 92ef92e41..a8405a330 100644 --- a/examples/Parameters/src/HelloWorld/HelloWorld.csproj +++ b/examples/Parameters/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable diff --git a/examples/Parameters/template.yaml b/examples/Parameters/template.yaml index b55df1b97..307726307 100644 --- a/examples/Parameters/template.yaml +++ b/examples/Parameters/template.yaml @@ -53,7 +53,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler MemorySize: 256 @@ -233,7 +233,7 @@ Resources: InitCustomResourcFunction: Type: AWS::Serverless::Function Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./cfn/HelloWorld.Cfn/ Handler: HelloWorld.Cfn::HelloWorld.Cfn.Function::FunctionHandler MemorySize: 256 diff --git a/examples/Parameters/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/Parameters/test/HelloWorld.Test/HelloWorld.Tests.csproj index 91d4986bc..af8f7d67a 100644 --- a/examples/Parameters/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/Parameters/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 diff --git a/examples/ServerlessApi/Readme.md b/examples/ServerlessApi/Readme.md index e33d7aab5..1574028ab 100644 --- a/examples/ServerlessApi/Readme.md +++ b/examples/ServerlessApi/Readme.md @@ -27,7 +27,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `serverless.template` file is in your current directory: diff --git a/examples/ServerlessApi/src/LambdaPowertoolsAPI/LambdaPowertoolsAPI.csproj b/examples/ServerlessApi/src/LambdaPowertoolsAPI/LambdaPowertoolsAPI.csproj index 841a878a1..9a1ec49c4 100644 --- a/examples/ServerlessApi/src/LambdaPowertoolsAPI/LambdaPowertoolsAPI.csproj +++ b/examples/ServerlessApi/src/LambdaPowertoolsAPI/LambdaPowertoolsAPI.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net10.0 enable enable true diff --git a/examples/ServerlessApi/src/LambdaPowertoolsAPI/template.yaml b/examples/ServerlessApi/src/LambdaPowertoolsAPI/template.yaml index 600bcc840..77a6e7016 100644 --- a/examples/ServerlessApi/src/LambdaPowertoolsAPI/template.yaml +++ b/examples/ServerlessApi/src/LambdaPowertoolsAPI/template.yaml @@ -12,7 +12,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: LambdaPowertoolsAPI::LambdaPowertoolsAPI.LambdaEntryPoint::FunctionHandlerAsync - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: '.' MemorySize: 256 Timeout: 30 diff --git a/examples/ServerlessApi/test/LambdaPowertoolsAPI.Tests/LambdaPowertoolsAPI.Tests.csproj b/examples/ServerlessApi/test/LambdaPowertoolsAPI.Tests/LambdaPowertoolsAPI.Tests.csproj index 435e74d34..1948cd3d4 100644 --- a/examples/ServerlessApi/test/LambdaPowertoolsAPI.Tests/LambdaPowertoolsAPI.Tests.csproj +++ b/examples/ServerlessApi/test/LambdaPowertoolsAPI.Tests/LambdaPowertoolsAPI.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 enable enable False diff --git a/examples/Tracing/README.md b/examples/Tracing/README.md index 04c3ffdef..04f03ca71 100644 --- a/examples/Tracing/README.md +++ b/examples/Tracing/README.md @@ -25,7 +25,7 @@ To use the AWS SAM CLI, you need the following tools. * Docker - [Install Docker community edition](https://hub.docker.com/search/?type=edition&offering=community) You will need the following for local testing. -* .NET 8.0 - [Install .NET 8.0](https://www.microsoft.com/net/download) +* .NET 10.0 - [Install .NET 10.0](https://www.microsoft.com/net/download) To build and deploy your application for the first time, run the following in your shell. Make sure the `template.yaml` file is in your current directory: diff --git a/examples/Tracing/src/HelloWorld/Dockerfile b/examples/Tracing/src/HelloWorld/Dockerfile index 932a2740c..c2cb448f6 100644 --- a/examples/Tracing/src/HelloWorld/Dockerfile +++ b/examples/Tracing/src/HelloWorld/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk@sha256:c8fdd06e430de9f4ddd066b475ea350d771f341b77dd5ff4c2fafa748e3f2ef2 AS build-image +FROM mcr.microsoft.com/dotnet/sdk@sha256:e1ffd2a92ae84c1291bc1b6887501f8af98e6331e7af6d4c8d37168c5e87a64c AS build-image ARG FUNCTION_DIR="/build" ARG SAM_BUILD_MODE="run" @@ -14,9 +14,9 @@ RUN dotnet tool install -g Amazon.Lambda.Tools # Build and Copy artifacts depending on build mode. RUN mkdir -p build_artifacts RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then dotnet lambda package --configuration Debug; else dotnet lambda package --configuration Release; fi -RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net6.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net6.0/publish/* /build/build_artifacts; fi +RUN if [ "$SAM_BUILD_MODE" = "debug" ]; then cp -r /build/bin/Debug/net10.0/publish/* /build/build_artifacts; else cp -r /build/bin/Release/net10.0/publish/* /build/build_artifacts; fi -FROM public.ecr.aws/lambda/dotnet@sha256:ec61a7f638e2a0c86d75204117cc7710bcdc70222ffc777e3fc1458287b09834 +FROM public.ecr.aws/lambda/dotnet@sha256:6a4e0d15ca7b7fa6879155f5ceef7231a19ab099756a7e36090db2bf2fde281f COPY --from=build-image /build/build_artifacts/ /var/task/ # Command can be overwritten by providing a different command in the template directly. diff --git a/examples/Tracing/src/HelloWorld/HelloWorld.csproj b/examples/Tracing/src/HelloWorld/HelloWorld.csproj index 93a81fa25..82c32b75a 100644 --- a/examples/Tracing/src/HelloWorld/HelloWorld.csproj +++ b/examples/Tracing/src/HelloWorld/HelloWorld.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0 true enable diff --git a/examples/Tracing/template-docker.yaml b/examples/Tracing/template-docker.yaml index d95bba4b4..8614df36d 100644 --- a/examples/Tracing/template-docker.yaml +++ b/examples/Tracing/template-docker.yaml @@ -32,7 +32,7 @@ Resources: Path: /hello Method: get Metadata: - DockerTag: dotnet6.0-v1 + DockerTag: dotnet10.0-v1 DockerContext: ./src/HelloWorld Dockerfile: Dockerfile DockerBuildArgs: diff --git a/examples/Tracing/template.yaml b/examples/Tracing/template.yaml index 30efd632f..f987f8c96 100644 --- a/examples/Tracing/template.yaml +++ b/examples/Tracing/template.yaml @@ -30,7 +30,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: - Runtime: dotnet6 + Runtime: dotnet10 CodeUri: ./src/HelloWorld/ Handler: HelloWorld::HelloWorld.Function::FunctionHandler MemorySize: 256 diff --git a/examples/Tracing/test/HelloWorld.Test/HelloWorld.Tests.csproj b/examples/Tracing/test/HelloWorld.Test/HelloWorld.Tests.csproj index 3795da8d5..aa6cd7db3 100644 --- a/examples/Tracing/test/HelloWorld.Test/HelloWorld.Tests.csproj +++ b/examples/Tracing/test/HelloWorld.Test/HelloWorld.Tests.csproj @@ -1,6 +1,6 @@ - net8.0 + net10.0