Introduction
The cloud consulting industry has spent a decade treating lift-and-shift migration as the embarrassing option: the thing you do when you don't have the budget or the courage to "do it right" with a full refactor. Reference architectures lead with microservices and managed services. Conference talks celebrate the teams that replaced their monoliths with Lambda functions and DynamoDB. The teams that just moved their servers to EC2 get mentioned apologetically, as a stepping stone, as something to fix later.
This framing is wrong, and it costs organizations real money. Lift-and-shift migration, rehosting an application on AWS with minimal architectural changes, is the correct choice in a wider range of scenarios than the industry acknowledges. It has lower migration risk, faster execution, and more predictable outcomes than refactoring. It moves applications out of expiring data center contracts and aging hardware. It establishes a stable cloud baseline from which actual cloud-native optimization can happen with production traffic data to inform the decisions.
This post makes the affirmative case for lift-and-shift, covers when it's the right choice and when it isn't, and walks through the AWS-specific patterns that make a rehost migration more than just a server transplant.
Why Lift-and-Shift Gets Dismissed and Why That's Mostly Wrong
The criticism of lift-and-shift migration is technically accurate but strategically incomplete. Yes, an EC2 instance running a monolithic application does not give you the elastic scaling, managed operations, or cost efficiency of a containerized microservice architecture. Yes, a lift-and-shift migration doesn't reduce your operational burden, you're still patching servers, managing capacity, and operating the application yourself. Yes, you're missing the opportunity to adopt managed databases, message queues, and autoscaling as part of the migration.
All of that is true. None of it means lift-and-shift is wrong.
The strategic case for lift-and-shift starts with the alternative: what happens if you don't lift-and-shift? The answer, for many organizations, is that the application stays on aging hardware, in an expiring data center contract, on an OS version that's two years out of support, while the refactoring project gets planned, scoped, debated, descoped, re-scoped, and eventually delivered in a form that required eighteen months instead of the estimated six. Meanwhile, the data center lease renewed for another three years because the refactoring wasn't done in time.
The organizations that execute successful cloud migrations, organizations that actually get their infrastructure off on-premises hardware and into AWS, do so by choosing approaches that can be executed in the available time with the available team. Lift-and-shift, for a medium-complexity application, can be executed in two to six months by a small team. A full refactor of the same application, in a team that's also responsible for ongoing feature development, routinely takes two to three years.
The concrete failure mode of choosing refactor over rehost: a healthcare organization I worked with decided to "do it right" and refactor their patient management system to microservices as part of the cloud migration. The migration started in January. By October, the refactoring was 40% complete, the data center contract had three months left, and the team made the decision to lift-and-shift the original monolith to buy time. They did in six weeks what they could have done in month two. The refactoring work continued on the AWS-hosted monolith, with production data, with actual traffic patterns, with real operational insight into what needed to change. Two years later, the refactoring is complete. Starting with lift-and-shift would have cost them eighteen months of anxiety and a contract extension that cost $180K.
AWS Deep Dive: Making Lift-and-Shift More Than a Server Transplant
AWS Application Migration Service: The Right Tool for Rehosting
AWS Application Migration Service (MGN) is the primary tool for lift-and-shift migrations. It installs a replication agent on source servers (physical, VMware, Hyper-V, other cloud providers), continuously replicates disk blocks to AWS staging, and supports test launches and production cutover with minimal downtime.
The replication agent runs on the source server without interrupting its operation. Disk writes on the source are captured and replicated to a staging area in AWS (EBS snapshots in the target region). When you're ready to test or cut over, MGN launches an EC2 instance from the replicated disk state with a launch template that defines the instance type, VPC placement, security groups, and IAM instance profile.
The launch template configuration is where most lift-and-shift teams underinvest. A default launch template produces an instance that runs but may not be optimally configured for AWS:
resource "aws_launch_template" "migrated_app" {
name_prefix = "migrated-app-"
image_id = var.replicated_ami_id # AMI from MGN
instance_type = "m6i.xlarge"
# Enforce IMDSv2, migrated instances often have apps that use IMDSv1
# Update the application's metadata calls before enforcing this
metadata_options {
http_endpoint = "enabled"
http_tokens = "required"
http_put_response_hop_limit = 1
}
network_interfaces {
associate_public_ip_address = false
security_groups = [aws_security_group.app.id]
subnet_id = var.private_subnet_id
}
iam_instance_profile {
name = aws_iam_instance_profile.app.name
}
# EBS optimization and encryption for data volumes
block_device_mappings {
device_name = "/dev/xvda"
ebs {
volume_type = "gp3"
encrypted = true
kms_key_id = var.kms_key_id
delete_on_termination = true
}
}
tag_specifications {
resource_type = "instance"
tags = merge(var.common_tags, {
MigratedFrom = var.source_server_name
MigrationDate = var.migration_date
ManagedBy = "terraform"
})
}
}
The MigratedFrom and MigrationDate tags are the ones that matter for long-term management. A fleet of migrated EC2 instances without these tags becomes an archaeological problem twelve months later when someone asks "which of these instances came from on-premises migration and which were built in AWS?" Tag at migration time.
The non-obvious MGN behavior that affects instance right-sizing: the replicated instance runs with the same performance characteristics as the source server, but EC2 instance types don't map directly to on-premises hardware. A server with 8 vCPUs and 32GB RAM might have been consistently running at 30% CPU and 60% memory. The equivalent EC2 instance type (m6i.2xlarge: 8 vCPU, 32GB) costs roughly $0.384/hour. Checking the source server's actual utilization data and right-sizing to what it actually used, not what it had provisioned, can reduce EC2 costs by 30-50% immediately. AWS Compute Optimizer can help right-size after the migration, but using pre-migration utilization data to inform the initial instance type choice is faster and saves money from day one.
What to Upgrade During a Lift-and-Shift (and What to Leave Alone)
The value of lift-and-shift is its speed and predictability, which means avoiding architectural changes during the migration. But there are specific improvements that add AWS-specific value without introducing the risk of an architectural change.
Right-size for cost, not for spec: As noted above, matching the on-premises provisioned spec in AWS almost always results in over-provisioned EC2 instances. Use CloudWatch agent metrics from the source server (if available) or the MGN pre-migration assessment to choose an instance type based on actual utilization, not theoretical capacity.
Upgrade storage to gp3: MGN-replicated instances come from block-level disk replication. The default EBS volume type in some MGN configurations is gp2. Changing to gp3 at migration time reduces EBS costs by approximately 20% and provides the same or better baseline IOPS without the IOPS-scales-with-size constraint of gp2. This is a safe, low-risk change that saves money immediately:
# Modify an existing EBS volume from gp2 to gp3 without downtime
aws ec2 modify-volume \
--volume-id vol-1234567890abcdef0 \
--volume-type gp3 \
--iops 3000 \
--throughput 125
Add SSM Session Manager instead of SSH: Lift-and-shift often means inheriting on-premises security practices, including bastion hosts and SSH access. On AWS, AWS Systems Manager Session Manager provides shell access to EC2 instances without inbound SSH port access, without bastion hosts, and with full session logging to CloudWatch and S3. The IAM instance profile on the migrated instance needs the SSM managed policy, and the instance needs the SSM agent (pre-installed on Amazon Linux 2023 and most Windows Server AMIs; may need installation on migrated OS images):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "Service": "ec2.amazonaws.com" },
"Action": "sts:AssumeRole"
}
]
}
With the AmazonSSMManagedInstanceCore policy attached to the instance role. This closes the SSH port entirely, which reduces the attack surface of every migrated instance without changing application behavior.
Leave the application architecture alone: Do not refactor the application as part of the migration. Do not change the database engine. Do not containerize the application because it seems like a good idea while you're in there. Every architectural change during a lift-and-shift adds risk to the migration without being necessary for the migration to succeed. Make the migration, stabilize in AWS, then optimize.
Auto Scaling Groups for Migrated Applications
Lift-and-shift applications often start as single EC2 instances: the same way they ran on-premises. One of the immediate AWS-specific improvements available after migration is wrapping the migrated instance in an Auto Scaling Group for fault tolerance, even if no actual scaling happens.
An ASG with min_size = 1, max_size = 1, desired_capacity = 1 provides automatic replacement of a failed instance without requiring manual intervention. If the instance fails a health check, the ASG terminates it and launches a replacement from the same launch template. This is a significant availability improvement over a single on-premises server that required manual intervention for every instance failure:
resource "aws_autoscaling_group" "migrated_app" {
name = "${var.app_name}-${var.environment}-asg"
min_size = 1
max_size = 1 # No scaling initially, just fault tolerance
desired_capacity = 1
vpc_zone_identifier = [var.private_subnet_id]
launch_template {
id = aws_launch_template.migrated_app.id
version = "$Latest"
}
health_check_type = "ELB"
health_check_grace_period = 300
tag {
key = "Name"
value = "${var.app_name}-${var.environment}"
propagate_at_launch = true
}
}
The health_check_type = "ELB" is important: it uses the load balancer's health check to determine instance health, rather than EC2 instance status checks alone. An instance that's running but not serving traffic correctly will fail the ELB health check and be replaced. An instance status check only tells you the EC2 instance is running: not that the application is healthy.
Enjoying this so far?
Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.
No spam. Unsubscribe anytime.
Tradeoffs & Decision Framework
Lift-and-shift is right when the speed and predictability of the migration outweigh the value of the architectural changes that a refactor would deliver. It's wrong when the application has characteristics that make AWS-native architecture materially better and the refactoring cost is justified by the improvement.
Lift-and-shift is the right choice when:
- A data center contract is expiring in under 12 months and a full refactor can't be completed in time
- The application is a commercial off-the-shelf product (COTS) that can't be refactored, ERPs, vendor software, licensed applications
- The team doesn't have the cloud-native expertise to refactor safely, and the cost of mistakes in refactoring exceeds the cost of operating a suboptimal EC2 architecture
- The application needs to be out of the data center as a prerequisite for other work (acquisitions, security audits, decommissioning dependencies), and the timeline is fixed
- The application is a candidate for retirement or replacement in the next 18-24 months, making refactoring investment non-recoverable
Refactor is justified when:
- The application has traffic patterns that make managed autoscaling (ECS Fargate, Lambda, Aurora Serverless) materially cheaper at scale than equivalent EC2 capacity
- The application team has the cloud-native expertise and the available time to execute the refactor without compromising feature delivery
- The current architecture has specific pain points (manual scaling, single points of failure, high operational overhead) that refactoring directly addresses
- A new application version is in development anyway: the migration is an opportunity to build the new version as cloud-native rather than refactoring the old version
The hybrid approach that usually makes the most sense: Lift-and-shift the application to get it into AWS. Spend 90 days observing actual traffic patterns, actual cost profiles, and actual operational pain points in the AWS environment. Then make architecture decisions informed by real data rather than assumptions from the on-premises environment. The lift-and-shift doesn't prevent the refactor: it sequences it in a way that makes the refactor decisions better.
Lessons From the Field
1. The organizations that always choose refactor over rehost are the ones still in their data centers. I've worked with three organizations that committed to cloud-native architecture as a non-negotiable migration requirement. All three are still running production workloads on-premises four years later. The refactoring projects are still in progress. The data center contracts renewed. The organizations that committed to getting into AWS first, with whatever approach was fastest, are now optimizing their cloud-native architecture with production traffic data. Done and improved beats planned and delayed every time.
2. COTS applications should never be refactored as part of a migration. Inherited a migration plan at a manufacturing company that included "containerize the SAP workloads" as a Phase 1 activity. SAP is not a workload you containerize: it has specific OS, file system, and network requirements that don't fit the container model, and doing so would have voided their SAP support contract. The correct migration approach: lift-and-shift to EC2 instances that met SAP's certified AWS instance type requirements (verify current SAP on AWS documentation for certified instance types), and leave the application entirely unchanged. This is the right answer for any licensed application with specific infrastructure requirements.
3. Right-sizing at migration time is the highest-ROI activity in a lift-and-shift project. The EC2 cost reduction from right-sizing migrated instances has paid for the migration engagement cost on multiple projects. On a 150-server lift-and-shift migration, collecting 30 days of CPU and memory utilization from on-premises servers and right-sizing to actual utilization reduced projected EC2 costs by 38% compared to matching on-premises provisioned specs. The right-sizing analysis took one week. The savings were immediate and permanent.
4. Adding an Auto Scaling Group with min=1 max=1 is the single most valuable improvement you can make to a lifted application in the first week.
At a retail client, a migrated application server failed due to a storage issue fourteen days after migration. On-premises, the equivalent event would have required manual server recovery. On AWS, the ASG detected the health check failure and launched a replacement instance in seven minutes. The application was restored without a page, without manual intervention, and without anyone being woken up. This capability, automatic instance replacement, is available to every lifted application with one Terraform resource and requires zero application changes.
5. Never refactor while migrating. Stabilize first. Worked with a team that decided to upgrade their Node.js runtime version as part of a lift-and-shift migration to AWS. The migration involved moving the server. The runtime upgrade introduced a dependency compatibility issue. When the migration failed, nobody could determine whether the failure was caused by the migration or the runtime upgrade: the changes were too entangled to diagnose cleanly. Treated each as a separate change, fixed the runtime issue first, then re-ran the migration. A week of debugging for a change that could have been done in the correct sequence in two days.
Final Thoughts
The cloud industry's bias against lift-and-shift reflects a genuine technical preference for cloud-native architecture, and that preference is correct in the abstract. Managed services, autoscaling compute, and serverless patterns are operationally superior to self-managed EC2 instances running monolithic applications. Nobody argues with that.
What the bias misses is that the alternative to lift-and-shift is often not a successful refactor, it's a stalled migration. The organizations that execute lift-and-shift migrations and then continuously optimize over time consistently end up in better architectural positions than the organizations that start with ambitious refactoring plans and never finish them.
The shift that's happening in the industry is toward treating lift-and-shift as a legitimate first phase rather than a failure of ambition. AWS Migration Hub Strategy Recommendations explicitly includes rehost as a valid strategy. AWS's own guidance on the 6 Rs (Retire, Retain, Rehost, Replatform, Refactor, Repurchase) treats rehost as a rational choice for specific workload categories. The professional conversation is catching up to what practitioners have known for a while: sometimes the right move is the fast move.
Key Takeaways
- Lift-and-shift is the correct choice when the cost of delay from refactoring exceeds the cost of running a suboptimal EC2 architecture. The organizations that always choose refactor over rehost are often the ones still in their data centers three years later.
- COTS and licensed applications should almost always be lifted, not refactored. Containerizing SAP, Oracle, or similar enterprise software typically voids support contracts and violates licensing terms. Check vendor-certified AWS instance types and migrate exactly as documented.
- Right-sizing at migration time (using pre-migration utilization data, not provisioned specs), reduces EC2 costs by 30-50% immediately. Matching on-premises provisioned capacity in AWS is the most common and most expensive mistake in lift-and-shift migrations.
- An Auto Scaling Group with
min=1 max=1 desired=1provides automatic instance replacement without requiring application scaling. A single lifted EC2 instance has no automatic recovery on failure. The same instance in an ASG with ELB health checks recovers automatically in under 10 minutes without manual intervention. - gp3 is cheaper than gp2 for most workloads and provides the same baseline performance without the IOPS-scales-with-size constraint. Converting EBS volumes to gp3 at migration time is a safe, low-risk cost reduction with no application changes required.
- Refactoring and lifting are not mutually exclusive choices, they're a sequence. Lift first to get off aging hardware and out of expiring data center contracts. Then refactor with the benefit of real AWS cost data, real traffic patterns, and real operational experience to inform the architecture decisions.
- Never introduce two changes simultaneously during a migration. Application upgrades, runtime version changes, and architectural modifications that happen concurrently with a server migration create entangled failure modes that are impossible to diagnose cleanly. Migrate first. Change second.
Get insights like this in your inbox
Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.
No spam. Unsubscribe anytime.