Skip to content

Upgrade solution from .NET Core 3.1 to .NET 10#5

Open
fisheraj wants to merge 1 commit into
aws-samples:mainfrom
fisheraj:main
Open

Upgrade solution from .NET Core 3.1 to .NET 10#5
fisheraj wants to merge 1 commit into
aws-samples:mainfrom
fisheraj:main

Conversation

@fisheraj

Copy link
Copy Markdown

Summary

Upgrades the solution from .NET Core 3.1 to .NET 10, including all Lambda functions, the ASP.NET Core API, EF Core data layer, and AWS CDK infrastructure project.

Changes

SDK and target frameworks

  • global.json: SDK 3.1.41610.0.100
  • All projects retargeted from netcoreapp3.1 / netstandard2.0 to net10.0

NuGet package updates

  • EF Core 3.1.2210.0.1 (Core, Design, Relational, Tools)
  • MySql.EntityFrameworkCore 3.1.1910.0.1
  • Amazon.Lambda.Core 2.0.02.7.1
  • Amazon.Lambda.APIGatewayEvents 2.4.02.7.3
  • Amazon.Lambda.Serialization.SystemTextJson 2.1.02.4.4
  • Amazon.CDK.Lib 2.10.02.250.0, Constructs bumped to [10.5.0,11.0.0)
  • Microsoft.Extensions.* 3.1.2210.0.1
  • AWSSDK packages (AppConfig, SecretsManager, SimpleSystemsManagement) bumped to matching v4 lines
  • Removed explicit System.Text.Json and System.Net.Http references (now built into the runtime)

Code modernization

  • API project converted to minimal hosting (merged Startup.cs into Program.cs)
  • BookingContext.cs: HasIndex().HasName().HasDatabaseName() (API removed in EF Core 5+)
  • CDK stack updates:
    • Cidr property → IpAddresses.Cidr()
    • PRIVATE_WITH_NATPRIVATE_WITH_EGRESS
    • MySQL engine VER_8_0_26VER_8_4_4 (8.0 reaches end of support July 2026; 8.0.26 no longer available in RDS)
    • Instance class BURSTABLE2BURSTABLE4_GRAVITON (t2 family unsupported for MySQL 8.4)
    • Removed obsolete ParameterType.STRING / Type property on StringParameterProps
    • Disambiguated InstanceType between EC2 and RDS namespaces
  • File-scoped namespaces and nullable reference types enabled across CDK code

SAM / Lambda deployment

  • template.yaml: runtime dotnetcore3.1dotnet10
  • All six aws-lambda-tools-defaults.json files updated: frameworknet10.0, function-runtimedotnet10

Other

  • docker-compose.yml: removed deprecated version key
  • Cleaned up stale nested-project reference in .sln pointing at a nonexistent GUID
  • Added repo-level NuGet.Config scoped to nuget.org

Testing

  • Full solution builds clean on .NET SDK 10.0.202 with 0 errors
  • sam build succeeds for all six Lambda functions on SAM CLI 1.158.0
  • CDK stack deploys successfully (VPC, RDS db.t4g.micro running MySQL 8.4.4, SSM parameter, secret)
  • sam deploy succeeds; API Gateway stage reachable
  • ApplyDatabaseMigrations Lambda runs EF Core migrations; confirmed BookingDB schema created
  • POST /booking/reserve returns HTTP 200 with a valid booking record from the deployed stack

Notes for reviewers

  • Moving from MySQL 8.0 to 8.4 is a major version change. This is a test/sample stack so there's no migration concern on a fresh deploy, but anyone upgrading an existing deployment should follow RDS's 8.0→8.4 upgrade path.
  • The NuGet.Config clears package sources down to only nuget.org. If your environment relies on private feeds, you may want to remove or adjust this file.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant