Cloud & InfrastructureIntermediate

Rehost, Replatform, Refactor (the Rs of cloud migration)

Cloud migration strategies ranked by how much the application changes, from moving it as-is (rehost) to redesigning it (refactor). AWS calls them the 7 Rs.

Pronunciation

/ˌriːˈhoʊst ˌriːˈplæt.fɔːrm ˌriːˈfæk.tər/
"ree-HOHST, ree-PLAT-form, ree-FAK-ter"

What is it

When a company decides to move its systems to the cloud, each application needs a migration strategy. The best-known ones are named with words starting with “R”, and they answer a business question: how much are we going to change this application along the way?

  • Rehost: moved as-is
  • Replatform: moved with some adjustments
  • Refactor: redesigned to take advantage of the cloud

There are more “Rs” (retire, retain, repurchase, relocate), but these three drive the most technical and budget decisions.

Where the “Rs” Come From

  • Gartner originally proposed a 5 Rs framework for migrating applications to the cloud.
  • In 2016, Stephen Orban (AWS) published 6 strategies that, according to his own article, build on Gartner’s 5 Rs.
  • Today AWS’s guide talks about 7 Rs, adding Relocate.

The 7 Rs According to AWS

Strategy Also known as What it involves
Retire — Shut down or archive applications that no longer add value
Retain — Leave it where it is, for now (dependencies, compliance, risk)
Rehost Lift and shift Move the application to the cloud without changes
Relocate — Transfer servers or resources to a cloud version of the same platform, without rewriting
Repurchase Drop and shop Replace it with a different product, typically SaaS
Replatform Lift, tinker, and shift Move with targeted optimizations, such as switching to a managed database
Refactor / Re-architect — Redesign the architecture to use cloud-native capabilities

Rehost vs. Replatform vs. Refactor

Less change, faster                                More change, more benefit
───────────────────────────────────────────────────────────────────────────→
   REHOST                  REPLATFORM                    REFACTOR
 Same app on a          App + managed                Redesigned app:
 cloud VM               services                     microservices,
                        (DB, containers)             serverless, events
Criterion Rehost Replatform Refactor
Speed High Medium Low
Upfront cost Low Medium High
Cloud benefits Few Partial Maximum
Technical debt Moves intact Slightly reduced Can be paid down

A replatform example AWS mentions: moving a Microsoft SQL Server database to Amazon RDS for SQL Server. A typical refactor example: breaking a monolith into microservices deployed in containers with Docker.

What AWS Recommends for Large Migrations

AWS’s guide states that refactoring is the most complex and costly strategy, and it isn’t recommended for large migrations because it means modernizing during the migration. Its suggestion: migrate first (rehost, relocate, or replatform) and modernize afterward, once the application is in the cloud.

Why It Matters for Companies in Latin America

When a migration comes with time pressure (a datacenter contract is expiring, hardware needs renewal, or a customer demands better availability), choosing the right R for each application avoids two costly extremes:

  • Rehosting everything: the cloud bill goes up and the application is just as hard to change
  • Refactoring everything: the project drags on and the business sees no results

Common Mistakes

❌ Applying the same R to the whole portfolio → Each application should be assessed by business value, risk, and complexity

❌ Rehosting and thinking you’ve “modernized” → A legacy system on a cloud VM is still legacy

❌ Refactoring legacy systems without an incremental strategy → For large systems, combine it with the Strangler Fig pattern

❌ Forgetting operations → Without DevOps practices, the cloud gets run just like the old datacenter

Practical Example (illustrative)

A retail company runs five applications in its datacenter:

Application Chosen strategy Why
Old unused intranet Retire Nobody uses it
Corporate email Repurchase Move to a SaaS service
Vendor ERP Rehost The code can’t be modified
.NET customer portal Replatform Containers and a managed database
VB6 ordering system Refactor Incremental rewrite to .NET + Angular

At Nextsoft we support these projects together with specialized strategic partners: the partner carries out the migration and Nextsoft delivers new modules, integrations, frontend and QA. Explore the legacy system modernization service. Let’s talk.

  • Docker - Containers, key to many replatform strategies
  • Microservices - A common target architecture in a refactor
  • Strangler Fig - Pattern for refactoring piece by piece
  • Mainframe - A platform that requires careful assessment before migrating
  • DevOps - Practices for running what you migrate well

Additional Resources: