1 Overview
The lift-and-shift approach, also known as rehosting, has long been the default for cloud migrations. It promises speed and minimal changes: move workloads as-is to cloud infrastructure, then optimize later. While this can work for some legacy systems, it often leads to missed opportunities for cost savings, scalability, and innovation. Many organizations find that after lift-and-shift, they are running the same inefficient architectures on more expensive infrastructure, with little gain beyond hardware refresh. The underlying problem is that the original architecture was shaped by the constraints of physical data centers, so transplanting it unchanged preserves those constraints in a new setting. Refactoring, or re-architecting, involves modifying applications to take advantage of cloud-native features. This might include breaking monoliths into microservices, adopting managed services, or redesigning for elasticity. The trade-off is higher upfront effort and risk. However, for most organizations, the long-term benefits outweigh the initial investment. A refactor-first strategy treats the migration as an opportunity to address accumulated technical debt rather than a simple relocation exercise. It also forces teams to clarify which capabilities are genuinely differentiating and which are commodity functions better handled by managed platforms. This article explores why skipping lift-and-shift in favor of a refactor-first strategy is often the better path, and how to plan such a migration. We will cover scoping, sequencing, cost and risk, rollback planning, and compliance. The goal is to provide a practical framework for deciding when to refactor and how to execute a refactor-first migration successfully. This is not a one-size-fits-all prescription; rather, it is a guide to making informed decisions based on your specific applications and business goals. Throughout, the emphasis is on deliberate choices, staged execution, and keeping business continuity intact while the underlying platform changes.
2 Scoping what actually moves
The first step in any migration is to understand what you have. A thorough application portfolio assessment is critical. Inventory all applications, their dependencies, data stores, and integration points. Not everything should move to the cloud, and not everything should be refactored. Some applications may be retired, replaced by SaaS, or left on-premises due to regulatory or latency constraints. Scoping is about making deliberate choices, and the assessment should capture enough detail to support those choices without becoming an endless documentation exercise. For each application, evaluate its business value, technical health, and cloud readiness. High-value, low-health applications are prime candidates for refactoring. Low-value, low-health applications might be candidates for retirement or replacement. High-value, high-health applications could be rehosted or replatformed with minimal changes. The key is to avoid a blanket approach. Refactoring everything is as unwise as lift-and-shifting everything. A useful discipline is to assign each application a target disposition and a short written rationale, so that later debates can reference the original reasoning rather than reopening every decision. Engage stakeholders from business and IT to prioritize applications based on strategic alignment. Consider data gravity: large datasets may be costly to move, so refactoring might involve bringing compute to the data rather than vice versa. Also assess team skills: refactoring requires cloud-native expertise, which may need to be developed or hired. Scoping should result in a prioritized list of applications with recommended migration strategies (refactor, replatform, rehost, retire, retain, or repurchase) and a clear rationale for each. Include rough sizing for effort and dependencies, and revisit the list periodically as understanding improves.
3 Sequencing the migration
Once you know what moves and how, sequence the migration to manage risk and dependencies. Start with a pilot application that is low-risk but representative of the broader portfolio. This allows the team to learn and refine processes before tackling critical systems. The pilot should be refactored to validate the approach, but choose an application where failure is tolerable and rollback is straightforward. Treat the pilot as a genuine rehearsal: measure how long each activity takes, note where assumptions broke down, and capture reusable patterns for later waves. After the pilot, group applications into waves based on dependencies and business cycles. Applications that share data or integrate tightly should move together or in close succession to avoid temporary integration complexity. Avoid migrating during peak business periods. Consider a phased approach: first, migrate non-critical workloads to build confidence; then, move critical workloads as expertise grows. Each wave should have an explicit entry and exit criteria, so that the organization does not accumulate half-migrated systems that drain attention from the remaining work. Sequencing also involves parallel run planning. For each wave, decide how long the old and new systems will run concurrently. This impacts cost and complexity. Some organizations use a strangler pattern, gradually routing traffic to the new system while the old one remains operational. Others prefer a big-bang cutover for each application. The choice depends on risk tolerance and the ability to synchronize data. Document the sequence and communicate it widely to avoid surprises. A visible migration calendar, shared with business owners, reduces the chance that a cutover collides with a product launch, audit, or seasonal peak.
4 Cost and risk at each phase
Costs in a refactor-first migration are front-loaded. Assessment and refactoring require significant engineering effort, often more than lift-and-shift. However, these costs can be offset by long-term savings from optimized resource usage, reduced licensing, and improved operational efficiency. It is essential to build a business case that accounts for total cost of ownership over several years, not just initial migration costs. Include the cost of training, tooling, and the temporary duplication of environments, since these are frequently omitted from early estimates. Risk also peaks during refactoring and cutover. Refactoring introduces bugs and performance regressions. Mitigate this with automated testing, canary deployments, and thorough code reviews. Cutover risk includes data loss, downtime, and integration failures. Mitigate with detailed cutover plans, data validation, and rollback strategies. Parallel run costs can be substantial, as you pay for both old and new environments. Budget for this and limit parallel run duration where possible. Assign a named owner for each major risk so that mitigation is not left to collective goodwill. Each phase has distinct cost drivers: assessment (staff time, tools), refactoring (development, testing), migration (data transfer, downtime), and operations (training, support). Risk evolves from unknown dependencies in assessment to technical debt in refactoring to operational disruption in cutover. A phased approach with clear gates helps manage both cost and risk. For example, do not proceed to cutover until performance benchmarks are met in a staging environment. Use a stage-gate process to review costs and risks before each phase, and be willing to pause or resequence when the evidence does not support moving forward.
5 Rollback and fallback planning
Even with the best planning, migrations can fail. A rollback plan is not optional; it is a critical component of risk management. For refactor-first migrations, rollback is more complex because the new system may have different data schemas and APIs. You cannot simply switch back to the old system without data reconciliation. Therefore, plan for rollback from the start, and treat it as a design constraint rather than an afterthought. One approach is to maintain the original environment in a rollback-ready state until the new system is proven stable. This means keeping the old infrastructure running, with data synchronization in place. If issues arise, you can fail back to the old system with minimal data loss. However, this increases costs, so define a clear window for rollback readiness (for example, a fixed number of days post-cutover) and then decommission the old environment. Document who has authority to trigger a rollback and what evidence is required, so the decision is not made under pressure. Another approach is to design the new system with backward compatibility, so that fallback is seamless. For example, use API versioning and data replication. Test rollback procedures as rigorously as you test the migration itself. Conduct dry runs and document step-by-step rollback instructions. Assign clear roles and responsibilities. Remember that rollback is not failure; it is a prudent contingency. Communicate the rollback plan to stakeholders and ensure business continuity plans are updated accordingly. Where full rollback is impractical, define a degraded-but-acceptable fallback mode and rehearse it.
6 Compliance along the way
Compliance requirements do not disappear during migration; they often become more complex. Data residency, privacy, and industry regulations must be addressed at every phase. During assessment, identify which applications handle regulated data and what controls are required. Refactoring may change how data is stored and processed, potentially introducing new compliance risks. For example, moving to a multi-tenant cloud service might require additional encryption or access controls, and splitting a monolith can create new data flows that must be documented and reviewed. During migration, ensure data is encrypted in transit and at rest. Maintain audit logs of all data movements. If you are migrating across borders, verify that data residency requirements are met. Some regulations require that data remains within a specific jurisdiction, which may limit your choice of cloud regions. Work with legal and compliance teams early to avoid last-minute blockers. Embedding a compliance reviewer in the migration team, even part-time, tends to surface issues while they are still cheap to fix. After cutover, update compliance documentation and evidence. Continuous compliance monitoring is easier in cloud environments if you use policy-as-code and automated checks. However, you must ensure that the new architecture meets all regulatory standards. Regular audits and penetration testing should be part of your post-migration operations. Remember that compliance is an ongoing process, not a one-time checkpoint. Build it into your migration plan from day one, and treat each wave as an opportunity to strengthen controls rather than merely preserve them.
7 Frequently asked questions
Is refactoring always better than lift-and-shift? No. Lift-and-shift can be appropriate for applications that are stable, low-value, or nearing end-of-life. It can also be a temporary step before refactoring. The decision should be based on business value, technical debt, and strategic goals. Refactoring is generally better for applications that are critical to the business and can benefit from cloud-native capabilities, while a simple rehost may suffice for utilities that are rarely changed. How do we decide which applications to refactor? Use a portfolio assessment to score applications on business value and technical health. High-value, low-health applications are strong candidates for refactoring. Also consider dependencies and data gravity. Start with a pilot to validate the approach and refine your criteria. Revisit the scoring after the pilot, because early estimates are often optimistic. What is the biggest risk in a refactor-first migration? Underestimating the effort and complexity. Refactoring requires skilled engineers and thorough testing. It also introduces risk of performance regressions and integration issues. Mitigate by starting small, automating testing, and having a solid rollback plan. The second most common risk is organizational fatigue when the migration runs longer than expected, so pace the work and celebrate completed waves. How long does a refactor-first migration take? It varies widely. A single application might take a few months; a large portfolio could take years. Phased approaches help manage duration and risk. Expect several months per application for a typical system, depending on complexity, and plan for the portfolio to outlast any single budget cycle. Can we refactor without downtime? Zero-downtime refactoring is possible but challenging. It often involves the strangler pattern, where you gradually replace parts of the system while it remains operational. This requires careful planning and robust testing. For many organizations, a short maintenance window is more practical and less risky than an elaborate zero-downtime scheme. What about cost overruns? Cost overruns are common in refactoring projects. To avoid them, define clear scope, use agile practices, and monitor costs closely. Build a contingency budget. Remember that long-term savings often justify higher upfront costs, but only if the scope is held steady and the benefits are actually realized after cutover.