Microsoft Workloads on AWS

Refactor to Modern .NET and Move to Linux

A brief history of .NET

In 2002, Microsoft introduced .NET Framework as a software platform for Windows to help developers rapidly create business applications and simplify complex programming tasks. Thousands of organizations of all sizes began to use it to create software for their business models.

Millions of developers around the globe adopted .NET Framework. It retained the simplicity of previous frameworks such as Visual Basic 6, but added the power, functionality, and flexibility of low-level languages such as C++. Notably, it introduced a new programming language, C#, enabling developers to be more innovative and productive than ever before.

Since .NET Framework applications could only run on Microsoft Windows , it resulted in large portfolios of custom applications running solely on that operating system. In the early 2010’s , the technology landscape began to rapidly change, with factors such as the rise of the Linux operating system, the growing influence of open source, modern DevOps practices, and modern architectural patterns changing the way applications were designed and built.

To address these trends, in 2016, Microsoft introduced a new technology called .NET Core, which was intended to be a cross-platform, open source, and lightweight platform. It comprised the “core” functionality of .NET Framework for building modern applications. Microsoft even granted governance of this new, modern development platform to the .NET Foundation (of which AWS is a corporate sponsor).

The last version of .NET named “.NET Core” was version 3.1. Starting with .NET 5, it was rebranded simply as “.NET”, signifying its intention to be the future of the .NET platform. Windows-based .NET Framework became a feature of the Microsoft Windows operating system, with 4.8 being the latest (and final) version.

Enter the cloud

Many organizations wanted to adopt modern .NET for their applications. The challenge, however, was that developers had been using .NET Framework on Windows for over a decade. They had written many business-critical applications using it, and continued to develop and maintain these applications, because it was very difficult to justify the expense of refactoring or rewriting without any business justification.

However, the cloud changed the entire IT landscape for businesses, including those with .NET workloads. Customers first began running their .NET applications on AWS in 2008 when Windows initially became available in the cloud. Organizations continued to choose AWS for their .NET applications because of the benefits of cloud computing, including improved security, scalability, resilience, and the ability to deploy applications globally, all with a pay-as-you-go pricing model.

The demand for modern cloud-based technologies like managed container orchestration, serverless computing, and purpose-built cloud databases has rapidly grown for .NET applications, and many of these require compatibility with the Linux OS. Many organizations have found themselves with portfolios of .NET Framework applications restricted to Windows. This means that they incurred the cost of the commercial licensing of that operating system, and were unable to use many of the modern, cloud-based technologies requiring Linux.

Why modernize .NET workloads

AWS defines “modernization” as the process of progressively transforming existing applications and infrastructure to extend to higher-value, cloud-based services that unlock new business capabilities, accelerate innovation, and reduce technical debt. This firmly applies to .NET applications, in which the adoption of modern technologies and the reduction of commercial licensing can help achieve these goals. An effective way to modernize these applications is to migrate them to a modern .NET version (.NET 6.0 and later versions) that is compatible with Linux, so they can use newer, cloud-based technologies and continue to leverage the .NET development skills of their teams.

Because of the ongoing trend of digital transformation for businesses of all size, there has been an increasing need for new applications to support new customer experiences and services. As IT departments face increased pressure to be even more efficient with budgets and headcount, they are still saddled with the burden of maintaining their legacy infrastructure and applications, while trying to continue to innovate. Modernization of these applications can help address the challenges of optimizing costs and improving application scalability, security, and resiliency.

Many organizations with .NET Framework applications have moved to the latest version of .NET so they can run them on modern Linux-based infrastructure in the cloud. Three examples include:

  • DraftKings followed a path to lower costs, increase scalability, and improve developer efficiency by modernizing their .NET Framework-based applications to use modern .NET and a microservices-based architecture.
  • CoStar reduced compute costs by 90% by adopting modern .NET for their applications and moving to serverless technologies.
  • AgriDigital reduced deploy time and effort by 50%, while providing their customers with 50% better performance by moving away from .NET Framework to modern .NET.

There are many business benefits of refactoring .NET Framework applications to the latest version, such as eliminating Windows Server licensing costs by moving to Linux, and the ability to adopt the latest innovations of the .NET community. However, refactoring .NET Framework applications to the latest version of .NET can be challenging, particularly for complex applications, or ones with dependencies lacking modern equivalents, such as ASP.NET Web Forms, Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF).

Modernization pathways for your applications

You have multiple pathways that you can follow when modernizing your .NET-based applications on AWS (Figure 1).

Modernization Pathways for .NET Applications on AWS

Figure 1: Modernization Pathways for .NET Applications on AWS

The three main pathways for application modernization are:

  • Rehost – Migrate your applications as-is to the cloud so that you can take advantage of secure, resilient, and scalable cloud infrastructure.
  • Replatform – Move your applications to cloud-based managed infrastructure—such as managed container orchestration and managed databases. This allows you to adopt modern DevOps and automation practices, and reduce management overhead, while minimizing the changes required for your code. This pathway includes moving applications to Windows Containers on AWS or using a managed runtime like AWS Elastic Beanstalk.
  • Refactor – Transform your applications so they can take full advantage of cloud benefits, and unlock the ability to innovate faster for your business. This pathway is where .NET Framework applications are transformed to modern .NET 6.0 and later versions, and monolithic applications are re-architected to use modern patterns, such as microservices and purpose-built databases.

How to modernize .NET workloads

Modernizing your legacy .NET applications to take advantage of modern .NET on AWS is an exercise that requires an understanding of the workloads involved, the business reasons, and the tools available for your chosen modernization pathway.

Identify and assess the candidate applications

When considering your application portfolio, you might already have one or more applications in mind that you would like to modernize. From a business standpoint, it is important that you understand the key drivers, such as eliminating technical debt, reducing cost, or the ability to release features more frequently. There are some questions you can ask about each application you are considering that will help you to determine the best modernization pathway:

  • Is your application built using .NET Framework, or does it have any other specific dependencies on the Windows OS or other internal/third-party dependencies?
  • What is the size and complexity of the application? Do you have the source code readily available for it?
  • Are you considering an architectural transformation, such as the adoption of microservices?
  • Is your modernization effort focused on moving to modern .NET, or will simply moving existing applications to Windows containers meet your needs?
  • Is the application at or near end of life?

Once you have thought about these questions to help you determine the best modernization pathway, you can start to consider the tools that AWS provides to help you with each of the pathways.

Option 1: Rehost .NET Applications

When you are considering a modernization pathway for your application, migration might be the right first step. Migrating your existing applications allows you to get your .NET applications into to the cloud quickly, mitigate security risks from out-of-support OS versions, and optimize costs by right sizing compute infrastructure. Migrating existing applications “as-is” allows you to run your legacy applications in the cloud while you plan for future modernization.

At AWS, we have tools that can help you migrate your legacy applications to the cloud, as shown in Table 1:

If you want to…

This AWS tool can help

Understand the modernization pathways for your entire application portfolio Migration Hub Strategy Recommendations analyzes entire applications on multiple servers, providing recommendations for the optimal modernization pathway for each.
Migrate application servers running from your on-premises environment AWS Migration Hub can help you collect data about your existing servers, understand their dependencies, build a migration plan, and migrate them to the clouds.
Optimize the cost of your migrated applications AWS Compute Optimizer will make recommendations for the resources to allocate to your applications, enabling you to right size your cloud-based compute workloads.

Table 1: Tools to help you migrate

Option 2: Replatform .NET applications

The next logical step of the modernization journey for .NET-based workloads is to replatform your applications. Replatforming enables you to migrate your applications to managed services without the need for a large-scale redesign or code modification. At AWS, when we talk about replatforming your .NET applications, one of the primary mechanisms is to containerize them and run them on a managed container service, such as  Amazon Elastic Container Service (Amazon ECS), Amazon Elastic Kubernetes Service (Amazon EKS), or AWS App Runner. Your legacy .NET Framework applications, such as ASP.NET MVC or Web Forms, can continue to run with IIS on Windows using Windows containers, while modern .NET applications can usually be moved to Linux containers with very little effort.

At AWS, we have tools that can help you replatform your legacy applications in the cloud, as shown in Table 2:

If you want to…

This AWS tool can help

Run existing Windows-based .NET applications using containers in the cloud AWS App2Container can help you containerize your existing .NET applications applications and create deployment pipelines for them to run on one of the AWS managed container services.
Assess an individual .NET application from your development environment and receive recommendations for modernization pathways AWS Toolkit for .NET Refactoring assesses your application source code and recommends modernization pathways, such as porting to modern .NET or deploying as containers. As a part of porting, it identifies API and package incompatibilities with modern .NET versions, as well as Windows dependencies like IIS and Active Directory.

Table 2: Tools to help you begin the modernization journey

Option 3: Refactor and optimize your .NET applications

Refactoring your .NET applications allows you to unlock the full capabilities of the cloud and develop new business capabilities. A common first step is to convert .NET Framework-based application code to modern .NET, to be compatible with Linux-based cloud services. Refactoring may also involve transformations of your applications to use cloud-first architectural patterns, such as serverless functions, event driven architectures, and microservices.

At AWS, we have tools that can help you refactor your applications to take full advantage of the cloud, as shown in Table 3:

If you want to…

This AWS tool can help

Convert your .NET Framework code to a modern version of .NET, such as .NET 6.0, so that it can run on Linux-based compute. Porting Assistant for .NET is a standalone, open-source tool that can help you port your codebase and identify incompatible APIs and dependencies. Reducing the effort to migrate to a modern version of .NET.
Convert your .NET Framework code to a modern version of .NET that runs on Linux and tests cloud deployments—all from within Visual Studio AWS Toolkit for .NET Refactoring helps you port your applications to the latest version of .NET, as well as run test deployments to AWS container services, all from within Visual Studio.
Understand the structure of your monolithic .NET application so you can more easily move to a microservices-based architecture Microservice Extractor for .NET is an assistive tool that allows you to visualize the internal structure of your application and use machine learning to  suggest a path for you to adopt a microservices-based architecture. It helps you to port your microservices to modern .NET, and extract the code into separate microservices so that you can then deploy separately.
Understand what the potential cost of operating your modernized application The Modernization Calculator for Microsoft Workloads helps you estimate the cost of modernizing your Microsoft workloads to a new architecture that uses open-source software and cloud-based services in AWS.
Optimize the performance and cost of your modern .NET applications that run on Linux AWS Graviton is an ARM-based processor that gives  improved price/performance for .NET workloads and often requires little to no code changes. You can use AWS Graviton for your modern .NET applications running on Amazon EC2, AWS Fargate, and AWS Lambda.

Table 3: Tools to help you modernize your applications

Conclusion

Modernizing your .NET applications on AWS can help you improve agility, unlock further capabilities, and lower costs reducing your dependence on commercial licensing. AWS provides tools to help you assess, transform, and optimize your applications during your modernization journey. These tools can help you get started and reduce the heavy lift in the process.

You don’t have to redesign your applications completely. Your modernization pathway depends on the type of the application you are looking to modernize and the business goals you are trying to achieve. Based on your applications’ priority and complexity, you can define a strategy to move the older versions of .NET Framework applications to supported versions first. Once you have successfully upgraded to a major supported .NET Framework version with no dependency issues, you can then decide on whether to break your application into microservices or run them on containers. AWS has a variety of tools to help you in every step of your modernization journey.

It is never too late to begin! Visit Modernization of Microsoft Workloads on AWS to discover resources, guides, and use cases that will help you get started with your .NET modernization journey!


AWS has significantly more services, and more features within those services, than any other cloud provider, making it faster, easier, and more cost effective to move your existing applications to the cloud and build nearly anything you can imagine. Give your Microsoft applications the infrastructure they need to drive the business outcomes you want. Visit our .NET on AWS and AWS Database blogs for additional guidance and options for your Microsoft workloads. Contact us to start your migration and modernization journey today.

Craig Bossie

Craig Bossie

Craig Bossie is a Solutions Architect that has been with AWS for three years and works with global customers, helping them migrate, modernize, and optimize their Microsoft Workloads for the AWS cloud. He’s been doing .NET development and consulting for over 18 years and is very excited to help customers better run their modern applications on AWS.

Aditi Sharma

Aditi Sharma

Aditi Sharma is a Global GTM Strategy Leader driving modernization product innovation and growth at AWS. Her focus area is modernization of Microsoft Workloads on AWS. She supports customers and partners throughout their modernization journey by enabling them to leverage various programs, tools and services that AWS has made available for modernizing Microsoft Workloads on AWS.

Pavankumar Kasani

Pavankumar Kasani

Pavankumar Kasani is an AWS Solutions Architect based out of New York city. He is passionate about helping customers to design scalable, well-architected and modernized solutions on the AWS Cloud. Outside of work, he loves spending time with his family, playing cricket, table tennis, and also testing out new recipes in the kitchen.

Runeet Vashisht

Runeet Vashisht

Runeet Vashisht is a Microsoft Specialist Solutions Architect at AWS with special focus on Microsoft technologies such as .NET and SQL Server on AWS. He is passionate about helping customers build modern software solutions using AWS cloud native services.