# Lift and Shift: When to Rehost Before Rewriting | gen2.dev

> Lift and shift moves a system to new infrastructure without changing it. When rehosting or replatforming beats rewriting, what it leaves behind, and the traps.

Source: https://gen2.dev/guide/lift-and-shift/

---

Field Guide

# Lift and shift: moving first, modernizing later

The least exciting migration is often the right first one: move the system as it is, prove it runs, and decide about the design with less pressure.

![Slide: a server box moved unchanged from a data center to a cloud, then modernized later, one part at a time.](https://gen2.dev/img/lift-and-shift.png)

Lift and shift is the name most people use for rehosting: "you move your applications from your source environment to the AWS Cloud without making any changes to the application." The same idea applies to any new host, cloud or not.

## Why do it first

A move that also changes the design has two ways to fail, and when something breaks nobody knows which one did it. Rehosting changes one thing.

AWS lists the benefit in its own terms: you can migrate "without worrying about compatibility, performance disruption, long cutover windows, or long-distance data replications," and the application keeps serving users while it moves. It also notes that applications "are easier to optimize or re-architect when they are already running in cloud."

## Rehost, relocate, replatform

-   **Rehost** moves the machines as they are. Tools can copy a server and keep it in step until the switch.
-   **Relocate** moves a whole platform to its hosted version at once.
-   **Replatform** moves and takes one or two easy wins on the way, such as a managed database in place of one you patch yourself. AWS's example is replatforming a SQL Server database to Amazon RDS for SQL Server.

For databases, AWS's Database Migration Service describes itself as a service "that makes it possible to migrate relational databases, data warehouses, NoSQL databases, and other types of data stores." The [data migration tools](https://gen2.dev/guide/data-migration-tools/) page compares the common options.

## What it does not fix

Moving a system does not shrink its bugs, its coupling or its licenses. A slow query is slow on the new host. Costs can rise, because an application sized for hardware you owned is now rented by the hour.

So write down, before the move, what the move is for: an ending contract, a data center closing, a hardware refresh, a security deadline. If the real complaint is the code, rehosting is a pause, not a fix, and the [rewrite vs refactor](https://gen2.dev/guide/rewrite-vs-refactor/) questions still apply afterward.

## Then modernize

Once the system runs on the new platform, change it in slices with the [strangler fig](https://gen2.dev/guide/strangler-fig/) pattern, starting where the old design hurts most. [Netflix](https://gen2.dev/cases/netflix-cloud-migration/) took the opposite route and rebuilt as it moved, over years. Both are legitimate. Choose on purpose.

## When not to use it

-   **The system cannot run on the new platform** without changes anyway.
-   **The move is the only chance to get funding** to fix a design that will not survive another year. Say so honestly and scope it.
-   **It would cost more to run than to replace.** Compare the monthly bill, not just the project.
-   **The deadline is far and the system small.** A direct rewrite may be simpler than moving twice.

## Checklist

-   The reason for the move is written down and measurable.
-   Dependencies, licenses and network paths are inventoried.
-   The new bill is estimated from real usage, not the old hardware.
-   The switch has a rehearsed rollback, as in [cutover](https://gen2.dev/guide/cutover/).
-   Modernization work has an owner and a date after the move.

## Sources

1.  [About the migration strategies - AWS Prescriptive Guidance](https://docs.aws.amazon.com/prescriptive-guidance/latest/large-migration-guide/migration-strategies.html) - rehost (lift and shift), relocate and replatform, and the advice to modernize after the migration
2.  [What is AWS Database Migration Service? - AWS documentation](https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html) - a managed service for moving databases

Last updated November 29, 2026.

## Field Guide

-   [Rewrite vs refactor](https://gen2.dev/guide/rewrite-vs-refactor/)
-   [The 7 Rs](https://gen2.dev/guide/seven-rs/)
-   [Characterization tests](https://gen2.dev/guide/characterization-tests/)
-   [Estimating a rewrite](https://gen2.dev/guide/estimating-a-rewrite/)
-   [Strangler fig pattern](https://gen2.dev/guide/strangler-fig/)
-   [Monolith to microservices](https://gen2.dev/guide/monolith-to-microservices/)
-   [Lift and shift](https://gen2.dev/guide/lift-and-shift/)
-   [Second-system effect](https://gen2.dev/guide/second-system-effect/)
-   [Branch by abstraction](https://gen2.dev/guide/branch-by-abstraction/)
-   [Anti-corruption layer](https://gen2.dev/guide/anti-corruption-layer/)
-   [Parallel run](https://gen2.dev/guide/parallel-run/)
-   [Shadow traffic](https://gen2.dev/guide/shadow-traffic/)
-   [Dual write and data migration](https://gen2.dev/guide/dual-write/)
-   [Expand and contract](https://gen2.dev/guide/expand-and-contract/)
-   [Data migration tools](https://gen2.dev/guide/data-migration-tools/)
-   [The cutover](https://gen2.dev/guide/cutover/)
-   [Feature flags and dark launches](https://gen2.dev/guide/feature-flags-and-dark-launches/)
-   [Big-bang cutover](https://gen2.dev/guide/big-bang-cutover/)
-   [API versioning](https://gen2.dev/guide/api-versioning/)
-   [Running two systems](https://gen2.dev/guide/running-two-systems/)
-   [Killing Gen 1](https://gen2.dev/guide/killing-gen-1/)
-   [Rewriting a mobile app](https://gen2.dev/guide/rewriting-a-mobile-app/)
-   [Selling a rewrite](https://gen2.dev/guide/selling-a-rewrite/)
-   [AI-written code](https://gen2.dev/guide/ai-written-code/)

## Should we rewrite it?

Sixteen questions about your system. A recommendation, and the reasoning behind it.

[Start the questions](https://gen2.dev/should-we-rewrite/)
