In cloud migration, "lift and shift" has emerged as a popular approach for moving existing applications to the cloud. It is a strategy that involves transferring an application to a cloud environment with minimal changes to its architecture. Companies often choose lift and shift when they want to realize the benefits of the cloud quickly, without investing significant time and resources into refactoring their applications.

For example, a company running a legacy .NET application on-premises. The hardware is aging, and they want to exit their data center within 6 months. Rebuilding the application would take too long, so they decide to "lift" the application as-is and "shift" it to run on virtual machines in Azure. This allows them to meet their deadline and start benefiting from the cloud's flexibility and potential cost savings.

What is Lift and Shift?

Lift and shift is a cloud migration model that focuses on moving applications to the cloud "as-is," with little to no modification of the application code or architecture. It essentially involves "lifting" the application from its current on-premises or hosting environment and "shifting" it to run on cloud infrastructure. This is in contrast to other migration strategies, such as re-architecting or rebuilding applications to be cloud-native. With lift and shift, the goal is to replicate the existing application environment in the cloud, using virtual machines or other cloud services that closely match the on-premises infrastructure.

You May Also Like: 7 Common Cloud Migration Pitfalls to Avoid

Consider a company running a Windows-based application on-premises. With a lift and shift approach to Azure, they could use Azure Site Recovery or Azure Migrate to replicate the application servers to Azure VMs:

```powershell 

# Create a Recovery Services vault 

$vaultName = "myVault" 

$vault = New-AzRecoveryServicesVault -Name $vaultName -ResourceGroupName $resourceGroupName -Location $location 



# Set the vault context 

Set-AzRecoveryServicesAsrVaultContext -Vault $vault 



# Create a Hyper-V site 

$siteName = "mySite" 

New-AzRecoveryServicesAsrFabric -Type HyperVSite -Name $siteName 

```  

The application's architecture and functionality would remain largely unchanged.

Lift and Shift vs. Other Migration Strategies

Lift and shift is just one of several approaches to cloud migration. Alternative strategies include re-platforming, refactoring, and rebuilding.

Re-platforming involves making some cloud optimizations without changing the core architecture. For example, a company might containerize their .NET application using Windows Containers and deploy it to Azure Kubernetes Service (AKS). Here's a sample Dockerfile for a .NET application:

```dockerfile 

FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base 

WORKDIR /app 

EXPOSE 80 

EXPOSE 443 



FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build 

WORKDIR /src 

COPY ["MyApp.csproj", "."] 

RUN dotnet restore "./MyApp.csproj" 

COPY . . 

WORKDIR "/src/." 

RUN dotnet build "MyApp.csproj" -c Release -o /app/build 



FROM build AS publish 

RUN dotnet publish "MyApp.csproj" -c Release -o /app/publish 



FROM base AS final 

WORKDIR /app 

COPY --from=publish /app/publish . 

ENTRYPOINT ["dotnet", "MyApp.dll"] 

``` 

Refactoring involves modifying the application to take full advantage of cloud-native features and services. This could involve breaking a monolithic application into microservices and leveraging Azure's PaaS offerings. For example, a .NET application could be refactored to use Azure Functions for compute, Azure Cosmos DB for data, and Azure Service Bus for messaging:

```csharp 

[FunctionName("ProcessOrder")] 

public static async Task<IActionResult> Run( 

    [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req, 

    [CosmosDB( 

        databaseName: "Orders", 

        collectionName: "Orders", 

        ConnectionStringSetting = "CosmosDBConnection")] IAsyncCollector<Order> orderData, 

    [ServiceBus("orders", Connection = "ServiceBusConnection")] IAsyncCollector<Message> orderMessages, 

    ILogger log) 

{ 

    log.LogInformation("C# HTTP trigger function processed a request."); 



    string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); 

    Order order = JsonConvert.DeserializeObject<Order>(requestBody); 



    await orderData.AddAsync(order); 

    log.LogInformation($"Order {order.OrderId} added to CosmosDB."); 



    var message = new Message(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(order))); 

    await orderMessages.AddAsync(message); 

    log.LogInformation($"Order message sent to Service Bus."); 



    return new OkResult(); 

} 

``` 

Rebuilding involves completely re-architecting or rewriting the application for the cloud. While this requires the most effort, it allows for a complete optimization of the application for the cloud environment.

Lift and shift is often the quickest and simplest path, as it doesn't require extensive changes to the application. However, it may not fully utilize all the capabilities and benefits of the cloud.

Lift and Shift Benefits and Drawbacks

Lift and shift migrations offer several compelling benefits.

  1. Speed: First, lift and shift is usually the fastest way to get applications running in the cloud, as it doesn't require re-architecting or code changes. This can be especially valuable for organizations with tight deadlines to exit a data center or migrate from an unsupported system.
  2. Ease: Second, without the need for extensive refactoring, lift and shift typically requires less upfront effort and expense compared to other migration strategies. This can help organizations achieve cloud benefits sooner within a limited budget.
  3. Low-Risk: Third, maintaining the same basic architecture and functionality reduces the risk of migration issues or business disruption. It's a lower-risk approach compared to completely re-architecting an application.

However, there are also potential drawbacks to consider.

  1. Limited Cloud Benefits: Lifted-and-shifted applications may not be able to take full advantage of Azure's PaaS offerings, serverless computing options, or cloud-native scalability features. This can limit the scalability, resilience, and cost optimization benefits realized from the cloud.
  2. Limited Scalability: Applications moved as-is may not be architected to scale or adapt easily in Azure. They may still require manual intervention to scale or update, reducing the agility benefits of the cloud.
  3. Higher Long-Term Costs: While upfront costs may be lower, lifted-and-shifted applications could be more expensive to run in Azure over time compared to applications that have been optimized for the cloud. They may not be able to fully utilize Azure's cost-saving features like Spot VMs, Reserved Instances, or auto-scaling.

When to Use Lift and Shift

Lift and shift is particularly well-suited for certain types of migration scenarios. One key use case is exiting the data center. For organizations looking to quickly exit an in-house data center or co-location facility, lift and shift to Azure offers a rapid path to the cloud. The speed of migration is often the top priority in these scenarios. Another good fit is migrating legacy applications. Older applications that would be difficult and risky to re-factor are good candidates for lift and shift to Azure. These may include legacy .NET applications or complex SharePoint deployments. The same applies for applications with an architecture that is already compatible with Azure IaaS services.

Lift and shift can also be a good first step for organizations new to Azure. It allows them to gain experience with Azure operations and realize some quick wins before progressing to more advanced cloud adoption. They can then optimize and re-architect strategically, based on learnings from the initial lift and shift.

Consider a retail company running their e-commerce site on-premises using Windows Server, IIS, and SQL Server. Their servers are reaching end-of-life and they want to exit their data center within 9 months, but the application is complex with many dependencies. A lift and shift to Azure VMs and Azure SQL Database could allow them to meet their deadline and start benefiting from Azure, without the risk of a rushed refactoring. Once in Azure, they can then plan a phased modernization to Azure App Service, Azure Functions, and Azure Cosmos DB.

The suitability of lift and shift depends on an organization's unique goals, timelines, and resources. If rapid migration and risk minimization are top priorities, lift and shift to Azure is often an attractive option. However, if the primary goals are to maximize cloud benefits and future-proof the application architecture, other migration strategies may be preferable.

Conclusion

Lift and shift migration is a quick way to move applications to Azure by replicating the on-premises environment. It allows organizations to gain some cloud benefits without major changes to applications. It allows organizations to gain some cloud benefits without major changes to applications. Often a mix of lift and shift and other techniques works best. Regardless of the approach, careful planning and execution are essential for a successful migration and realizing the full benefits of Azure.

Are you ready to implement a lift and shift cloud migration for your organization? Read our lift and shift process blog for more information or reach out to our team for support!

Frequently Asked Questions

How do lift and shift work? Lift and shift works by moving an application and its associated data to the cloud without redesigning the app.

What is an example of lift and shift? An example of lift and shift is moving a legacy .NET application running on-premises to Azure Virtual Machines.

What is lift and shift in Azure?
Lift and shift in Azure refers to the process of migrating an existing application or workload to the Azure cloud platform without making significant changes to the application's architecture or codebase.

What are lift and shift services? Lift and shift services are cloud offerings that facilitate moving applications to the cloud without refactoring, such as Azure Site Recovery.