Skip to content

chore(examples): migrate examples and docs to .NET 10 - #1267

Open
nicolastarzia wants to merge 1 commit into
aws-powertools:developfrom
nicolastarzia:chore/migrate-examples-dotnet10
Open

chore(examples): migrate examples and docs to .NET 10#1267
nicolastarzia wants to merge 1 commit into
aws-powertools:developfrom
nicolastarzia:chore/migrate-examples-dotnet10

Conversation

@nicolastarzia

@nicolastarzia nicolastarzia commented Sep 6, 2026

Copy link
Copy Markdown

Issue number: #1268

Closes #1268

Summary

Changes

Migrates all example projects and documentation from .NET 8 (with some lingering .NET 6 runtimes) to .NET 10, and adds a v4 migration guide. This PR intentionally does not touch the production libraries under libraries/src/ — those already multi-target net8.0;net10.0.

  • Target framework: all example .csproj net8.0net10.0
  • SAM templates: Runtime dotnet6/dotnet8dotnet10
  • Deploy config: aws-lambda-tools-defaults.json function-runtimedotnet10
  • Container examples:
    • Dockerfile base images repinned to real .NET 10 digests — MCR dotnet/sdk:10.0 and ECR Public lambda/dotnet:10.x (both multi-arch amd64+arm64), resolved directly from the registries
    • publish path net6.0net10.0
    • DockerTag dotnet6.0-v1dotnet10.0-v1
  • Kafka: Protobuf OutputDir net8.0net10.0
  • Docs: example READMEs (.NET 8.0.NET 10.0, dotnet8dotnet10), root README badge + managed-runtime text, and a new docs/migration-guide-v4.md

Several SAM templates were previously on dotnet6 while their .csproj were already net8.0 (pre-existing inconsistency), now aligned on dotnet10.

User experience

Before: copying an example gives a project targeting net8.0 (or a SAM template still on the dotnet6/dotnet8 managed runtime), pointed at a runtime about to reach end of support.

After: examples target net10.0 and deploy on the dotnet10 managed runtime out of the box, aligned with the current LTS runtime and with the libraries that already support net10.0.

Checklist

Please leave checklist items unchecked if they do not apply to your change.

Testing

  • .NET 10 SDK 10.0.400 confirmed locally
  • Example test suites pass on net10.026 tests, 0 failures: Logging (1), Metrics (1), Tracing (1), BatchProcessing (13), Parameters (6), ServerlessApi (1), AOT Logging/Metrics/Tracing (1 each)
  • Container base-image digests verified buildable via Finch (multi-stage build with both images succeeded; SDK image reports 10.0.400)

Known limitation: the Idempotency example test is an integration test that spins up DynamoDB Local via Testcontainers (Docker). It could not be executed locally (no Docker daemon). The code compiles cleanly on net10.0; only the test infrastructure was unavailable — please validate in CI.

Is this a breaking change?

No. This changes only the example projects and documentation; no production library code is modified.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

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.
@boring-cyborg boring-cyborg Bot added the documentation Improvements or additions to documentation label Sep 6, 2026
@boring-cyborg

boring-cyborg Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #dotnet channel on our Powertools for AWS Lambda Discord: Invite link

@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 6, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added the internal Maintenance changes label Sep 7, 2026

@hjgraca hjgraca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples is the last project that we need to change for the dotnet 10 support
We need to change the github build matrix #541
then the dotnet 10 support in the libraries #542
and then the examples.

---
title: Migration Guide v4
slug: migration-guide-v4
description: Migration guide to upgrade to v4 (.NET 10)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a major version release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation internal Maintenance changes size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: migrate examples and docs to .NET 10

2 participants