AWS Cloud Migration: 3-Tier Architecture from an on-prim data center to AWS Cloud!

Girish Bhatia - Oct 27 - - Dev Community

In this article, I don't have a hands-on workshop, rather, I will explain few migration approaches for migrating a 3 tier architecture application from an on prim data center to AWS Cloud.

Due to my keen interest in AWS Cloud, I’m often approached by friends and colleagues in IT to share examples or opinions on AWS cloud migration use cases. Since most of my friends work in IT, we share mutual interests and often discuss emerging technologies.

This weekend, one of my friends called to talk about AWS migration strategies and suggested that I write an article on the topic. Taking his advice, I’m writing this article to put together the key thoughts from our discussion, explaining the options available to migrate a 3-tier architecture application to AWS Cloud.

Migrating on-premises applications to the cloud offers numerous benefits such as scalability, reliability, and cost efficiency. This article explains the various options available when migrating a 3-tier architecture—consisting of a web server, application server, and a Microsoft SQL Server database—from an on-premises data center to AWS Cloud.

We’ll evaluate four options:

  • AWS MGN (Application Migration Service)
  • Containers using ECS and EKS
  • Serverless (Lambda and other services)
  • Amazon Aurora as a replacement for Microsoft SQL Server.

We will also frame these options within the context of Rehost, Replatform, and Refactor (Rewrite) migration strategies.

Revisit 7 'R's of Cloud Migration

Migrating on-premises applications to the AWS Cloud can take various forms depending on business goals, application architecture, funding available, schedule and the desired level of modernization.

AWS defines seven common migration strategies, known as the "7 R’. Each approach provides a distinct path to the cloud, balancing speed, complexity, and the benefits of cloud-native capabilities:

  • Rehost (Lift-and-Shift)
  • Replatform
  • Repurchase
  • Refactor (Rewrite)
  • Relocate
  • Retain
  • Retire

Overview of the 3-Tier Architecture

The application in focus follows a traditional 3-tier architecture:

  • Web Server: Frontend that serves HTTP requests to users.
  • Application Server: Backend business logic processing.
  • Database Server: Microsoft SQL Server for data persistence.

For this example, let’s assume the on-prim setup is as follows:

  • Web Server: Apache HTTP running on a Linux VM.
  • App Server: Java-based application running on a Tomcat server.
  • Database Server: Microsoft SQL Server running on a Windows VM.

3Tier Img

Migration Strategies: Rehost, Replatform, Refactor

Rehost (Lift-and-Shift):

Rehosting involves moving applications to the cloud with minimal changes, effectively replicating the on-premises environment. This strategy is often chosen for speed and simplicity.

Replatform:

Replatforming involves making some optimizations and changes to take advantage of cloud features without completely rearchitecting the application. It offers a balance between modernization and effort.

Refactor (Rewrite):

Refactoring, or rewriting, is the process of redesigning the application to be cloud-native. This often provides the greatest long-term benefits but requires the most effort upfront.

Rehost with AWS MGN (Lift-and-Shift)

AWS Application Migration Service (MGN) supports a Rehost strategy by providing a straightforward "lift-and-shift" approach. This involves moving the virtual machines from an on-prem environment to AWS without major architectural modifications.

Advantages
Simplicity: Minimal changes to the application architecture.
Speed: No need for code changes, allowing for a fast migration process.
Challenges
Scalability: Limited scalability as the architecture remains unchanged.
Ongoing Management: EC2 instances need to be managed, including patching and scaling.

mgn img

Example:

  • Web and App Servers: Replicate on-prim servers into Amazon EC2 instances.
  • Database Server: Move SQL Server to an EC2 instance running Windows or Amazon RDS for SQL Server.

Replatform with Containers (ECS/EKS)

Migrating to containers can be considered a Replatform strategy, where the application is slightly modified to take advantage of modern cloud infrastructure like Amazon ECS or EKS without changing the core application logic.

Example:

  • Web and App Servers: Containerize Apache HTTP and Tomcat servers using Docker, then deploy them on Amazon Elastic Container Service (ECS) or Amazon Elastic Kubernetes Service (EKS).
  • Database: SQL Server can either remain on EC2 or be moved to Amazon RDS or Amazon Aurora for improved scalability.

Refactor (Rewrite) with Serverless (Lambda, API Gateway, RDS/Aurora)

A full Refactor (or Rewrite) strategy leverages AWS-native serverless services to rearchitect the application. By breaking the web and app servers into AWS Lambda functions and using API Gateway for handling HTTP requests, the application can fully benefit from cloud-native design principles.

Example:

  • Web Layer: API Gateway handles HTTP requests and routes them to Lambda functions.
  • App Layer: The business logic is decomposed into stateless Lambda functions.
  • Database: SQL Server can be migrated to Amazon RDS for SQL Server or Amazon Aurora for high availability and automatic scaling.

Database Modernization: Replatform or Refactor with Amazon Aurora

Amazon Aurora is a fully managed, MySQL- and PostgreSQL-compatible database designed for high performance and availability. It is an ideal choice for Replatforming or Refactoring the database layer by replacing Microsoft SQL Server with a cloud-native, highly scalable alternative.

Example:

Web and App Servers: These can be migrated using AWS MGN, containers, or serverless.
Database: SQL Server is replaced by Amazon Aurora, which can be done either as part of a Replatform strategy (minimal changes) or a Refactor strategy (modernizing to cloud-native architecture).

Conclusion: Choosing the Right Approach

Choosing the right migration strategy depends on the organization's goals, timeline, and technical capacity. Here’s a quick recap of which approach might be suitable based on Rehost, Replatform, and Refactor strategies:

  • Rehost (AWS MGN): A fast and simple solution for migrating with minimal disruption. Best for organizations prioritizing speed over modernization.
  • Replatform (Containers or Aurora): A balance between modernization and simplicity. Allows for incremental cloud optimizations without significant changes to application code.
  • Refactor (Serverless, Lambda, Aurora): A long-term solution that offers maximum cloud-native benefits like automatic scaling and cost savings. However, it requires significant effort to refactor the application.

By evaluating these options and aligning them with the migration strategies, businesses can choose the approach that best fits their goals, timeline, and cloud maturity level. AWS provides the flexibility to evolve from a Rehost to a Replatform and eventually to a Refactor approach as needed.

Thank you for reading!

Click here to watch the YouTube video for this article:

https://www.youtube.com/watch?v=-8sQpHzoP-A

𝒢𝒾𝓇𝒾𝓈𝒽 ℬ𝒽𝒶𝓉𝒾𝒶
𝘈𝘞𝘚 𝘊𝘦𝘳𝘵𝘪𝘧𝘪𝘦𝘥 𝘚𝘰𝘭𝘶𝘵𝘪𝘰𝘯 𝘈𝘳𝘤𝘩𝘪𝘵𝘦𝘤𝘵 & 𝘋𝘦𝘷𝘦𝘭𝘰𝘱𝘦𝘳 𝘈𝘴𝘴𝘰𝘤𝘪𝘢𝘵𝘦
𝘊𝘭𝘰𝘶𝘥 𝘛𝘦𝘤𝘩𝘯𝘰𝘭𝘰𝘨𝘺 𝘌𝘯𝘵𝘩𝘶𝘴𝘪𝘢𝘴𝘵

. . . . . . . . . . . . . .
Terabox Video Player