.NET on AWS Blog

Find Your Pathway to .NET Modernization on AWS

AWS has supported .NET workloads since 2008. Over the years, .NET has changed from a less flexible, Windows-only framework to a modular, cross-platform runtime. Today, you can run legacy .NET Framework applications on Windows, as well as modern .NET applications on Linux, all fully supported on AWS. Although legacy .NET Framework applications will run on AWS, modernizing your .NET workloads lets you reduce cost, take advantage of containers and serverless, and move to microservices and built-for-cloud architectures.

In this post, I’ll share some different pathways to .NET modernization, along with assistive tools and guidance from AWS. Throughout this post, I’ll refer to cross-platform .NET (formerly called .NET Core) as “modern dotnet” to clearly distinguish it from .NET Framework.

Why modernize your .NET applications?

Let’s first expand on what “.NET modernization” means and some reasons to consider it. .NET modernization can include 1) upgrading your application code to modern dotnet, 2) migrating to cloud and containers, 3) graduating from licensed products to open source, and 4) moving to a modern architecture. Since your data needs to come along with the application, you’ll have a similar set of considerations for your database.

First, moving from legacy .NET Framework to modern dotnet provides access to new features and performance improvements. Although .NET Framework 4.8 continues to be supported on Windows, the platform is no longer in active development. In contrast, modern dotnet receives regular updates, with new features and performance improvements every year.

Second, you can move to the cloud, where you have the elasticity to scale and the flexibility of pay-as-you-go pricing. In the cloud, you can also use containers, which have become a de facto standard. Containers make your applications portable, use servers more efficiently, and open up more service options for you in the cloud. You can learn about AWS container services at Containers at AWS.

Third, you can reduce your costs by moving to open-source products where there is license freedom. Your modern dotnet code can run on Linux without operating system license fees. You can also remove license fees by moving from SQL Server or other proprietary relational databases to an open-source database. You can learn about AWS relational and purpose-built databases at AWS Cloud Databases.

Fourth, you can modernize your architecture in the cloud. Transforming a single large “monolithic” application into microservices brings technical and organizational benefits from loose coupling and a reduction in complexity. You can learn more about microservices on AWS at Microservices. You can go further to a fully cloud-native architecture and maximize the benefits of the cloud. Event-driven solutions built on managed services, serverless, and purpose-built databases are decoupled, agile, efficient, and auditable. You can learn more about these disciplines at What is Cloud Native, What is an Event-Driven Architecture, and Serverless on AWS.

With all of these choices, you may be wondering where to start in modernizing your .NET applications and where you’ll end up. It’s helpful to understand the benefits, technical work, and level of effort for each approach.

Pathways to modernization

At AWS, we often refer to modernization as a journey, but it’s not the same path for everyone. There are multiple pathways you can pursue to modernize your .NET applications on AWS, and some are simpler than others. Let’s look at the following four pathways that come with assistive tools from AWS and use managed services.




Assess your portfolio to plan your modernization strategy Migration Hub Strategy Recommendations Identify an optimal strategy and pathways for modernizing multiple applications.
Replatform .NET Framework on Windows Containers AWS App2Container Minimal effort migration to AWS without code changes. Consolidate servers to reduce Windows license fees.
Refactor .NET Framework to Modern .NET on Linux containers AWS Toolkit for .NET Refactoring, or
Porting Assistant for .NET
Reduce costs by running on Linux without OS license fees.
Refactor Monolithic .NET application to microservices AWS Microservice Extractor for .NET Improved scalability, agility, and stability.

Assess your application portfolio and plan modernization

If you’re not sure where to start, start here. If you have multiple applications to modernize, it makes sense to assess your application portfolio before you focus on individual applications. Assessment can clarify your modernization priorities and help identify a strategy. It’s the ideal starting point for modernization, just as you would plan a trip before beginning your travel. You may discover repeatable patterns that increase your modernization velocity.

High-level overview of assessing a portfolio of applications with AWS Migration Hub Strategy Recommendations.

AWS Migration Hub Strategy Recommendations (MHSR) helps you build a migration and modernization strategy for your applications, whether running on-premises or in AWS. MHSR analyzes your servers, application source code, and databases. It then delivers prescriptive guidance on the optimal strategy and tools to help you modernize at scale.

Replatform .NET Framework on Windows Containers

You can migrate your .NET Framework IIS web applications to AWS with minimal effort using Windows containers, usually without code changes. Containerizing applications lets you reduce Windows licensing costs by consolidating servers and using computing resources more efficiently. Your containerized application ends up as a Windows container image in Amazon Elastic Container Registry (ECR). You can host your Windows containers in Amazon Elastic Container Service (Amazon ECS) or, if you prefer Kubernetes, Amazon Elastic Kubernetes Service (Amazon EKS). When you deploy to Amazon ECS, you have the option of hosting your Windows containers serverlessly, using AWS Fargate.

Use the AWS App2Container (A2C) command line tool to analyze your applications and automatically generate a container image with the correct dependencies, network configurations, and deployment instructions for Amazon ECS or Amazon EKS. A2C will also handle the deployment to AWS for you.

High-level overview of migrating a .NET Framework application to Windows containers on AWS with the App2Container tool.

Here’s how A2C works. First, A2C scans your servers to create an inventory of web applications. Second, a Windows container image is created for a selected .NET Framework IIS application. Third, a CI/CD pipeline is created with deployment artifacts. Lastly, a service is created on either Amazon ECS or Amazon EKS. Your .NET Framework app is now running in a Windows container on AWS. To complete this modernization pathway, you will also need to move your database to AWS and migrate other application dependencies from your original environment.

Refactor .NET Framework to modern dotnet on Linux containers

Porting your .NET Framework applications to modern dotnet allows you to save on licensing costs by running on Linux. Once ported, you can run your modernized dotnet application in managed Linux containers on AWS App Runner, Amazon ECS, or Amazon EKS. AWS App Runner is best suited for simpler web applications, whereas Amazon ECS and Amazon EKS can handle orchestration of multiple container services.

High-level overview of refactoring a .NET framework application to modern .NET using AWS Refactoring Toolkit for .NET.

Use either the AWS Toolkit for .NET Refactoring or Porting Assistant for .NET tool to jumpstart your porting effort. These assistive tools scan .NET Framework applications to identify incompatibilities with modern dotnet, find known replacements, generate a detailed compatibility assessment, and modify your code for Linux compatibility. You’ll likely need to do some manual porting work yourself, but these assistive tools do the heavy lifting for you. The compatibility assessment points you to strategies and solutions for resolving porting issues, such as Modernizing legacy WCF applications to CoreWCF.

Which porting tool should you use? Consider that Porting Assistant for .NET is open source, while the Toolkit for .NET Refactoring has additional features such as testing on AWS environments to validate changes, and provides an integrated experience in Visual Studio.

Refactor monolith to microservices

Microservices are an architectural approach to software development where software is composed of small independent services that communicate over well-defined APIs. Compared to tightly-coupled monolithic applications, microservices make applications easier to scale and faster to develop. Microservices are not only better technically, they’re better organizationally because each can be owned by the most suitable team. You can learn more about microservices on AWS at Microservices.

High-level overview of refactoring a monolith to microservices using AWS Microservice Extractor for .NET.

You can progressively move parts of your monolithic application over to microservices by following the Strangler Fig pattern with the AWS Microservice Extractor for .NET tool, which simplifies refactoring of both .NET Framework and modern dotnet applications. Microservice Extractor analyzes your application and gives you a visualization of its components and dependencies. It recommends candidates for microservice extraction based on machine learning, or you can manually group components. You refactor your code by isolating business domains and removing dependencies, using the tool to extract groups into separate service projects. Microservice Extractor can port your .NET Framework code to modern dotnet as it extracts services, through an integration with Porting Assistant for .NET. For a detailed treatment of refactoring to .NET microservices on AWS, read our technical guide, Monolithic to Microservice Journey for .NET Applications.


In this post, I reviewed several pathways to .NET modernization, along with assistive tools from AWS that can guide you and reduce the effort involved. To get started modernizing your .NET applications, visit Modernize .NET Workloads on AWS, where you’ll find guidance, tools, demos, and deep dives on these approaches. In addition to the pathways discussed in this post, you can find additional modernization pathways on the Modernize Windows Workloads with AWS page, the Guide to Microsoft Workloads Modernization, and the AWS Modernization Tools for Microsoft Workloads Reference Guide.