How to Migrate On-Premise Servers to AWS: A Complete Technical Guide
You’ve been running your infrastructure on-premise for years. The servers are aging, the datacenter bills keep climbing, and your team is exhausted from managing hardware refreshes and physical maintenance. You know cloud migration is the answer, but the question looming over your budget meetings is: how do you actually migrate on-premise servers to AWS without bringing everything down?
This isn’t a theoretical exercise. Every quarter, thousands of enterprises attempt this migration, and the ones who succeed are the ones with a solid technical plan. This guide walks you through the complete process—from assessment through cutover—with the practical details DevOps engineers and infrastructure teams need to execute successfully.
Why Migrate On-Premise Servers to AWS?
Before diving into the how, let’s be clear about the why. Understanding your actual drivers shapes your migration strategy.
Cost optimization is the obvious one, but it’s more nuanced than “cloud is cheaper.” Your on-premise infrastructure has sunk costs (already paid for), but ongoing operational expenses—power, cooling, physical security, IT staff time managing hardware—compound quickly. AWS shifts these to variable costs that scale with demand.
Operational efficiency comes next. You’re not managing hardware refreshes, firmware updates, or datacenter capacity planning. Your team focuses on applications, not infrastructure.
Scalability and flexibility is where AWS really shines. Need to handle 10x traffic during a product launch? Spin up resources in minutes instead of weeks of hardware procurement.
Disaster recovery and high availability become simpler and more affordable. AWS’s multi-region architecture and managed services reduce RTO and RPO without massive redundant infrastructure.
That said, I’ll be honest: migration isn’t free. Plan for migration costs (tools, labor, potential downtime), application refactoring if you’re modernizing, and a transition period where you’re paying for both on-premise and cloud infrastructure.
Phase 1: Assessment and Planning
This phase makes or breaks your migration. Skip it, and you’ll be firefighting six months in.
Inventory Your Current Infrastructure
You need to know what you’re moving. This means:
Physical and virtual servers: Count them. Document OS versions, CPU/memory specs, storage configurations. If you’re running VMware, use VMware’s migration tools. If you’re on Hyper-V, leverage Microsoft’s tools.
Network architecture: Document subnets, VLANs, routing, firewalls, load balancers, DNS. This shapes your VPC design.
Storage systems: SAN volumes, NAS shares, local storage. Know your IOPS, throughput, and capacity requirements.
Databases: Which databases run where? What are the backup strategies? This is critical—databases are often the trickiest part of migrations.
Applications and dependencies: What runs on each server? What talks to what? Which applications are tightly coupled to on-premise infrastructure?
Security and compliance: Understand your security requirements, compliance obligations (HIPAA, PCI-DSS, SOC2), and data residency constraints.
Use tools like AWS Application Discovery Service (agentless or agent-based) to automatically map dependencies. It’s not perfect, but it beats spreadsheets.
Calculate Total Cost of Ownership (TCO)
Use AWS’s TCO calculator as a starting point. Input your current infrastructure details and compare with equivalent AWS resources. Be realistic about:
- On-premise operating costs: Staff time (salaries for sysadmins, DBAs), power/cooling, facility costs, hardware maintenance and replacement
- AWS costs: Compute, storage, data transfer, managed services
- Migration costs: Tools, professional services, internal labor, potential productivity loss during cutover
A typical TCO analysis shows payback in 18-36 months for compute-heavy workloads, longer for small deployments with low operational overhead.
Define Your Migration Strategy
This is where you pick your approach. AWS outlines the “6 Rs”:
| Strategy | When to Use | Example |
|---|---|---|
| Rehost | Lift-and-shift older apps, quick wins | Legacy Windows app on bare metal → EC2 |
| Replatform | Minor optimization, managed services | Self-managed database → RDS |
| Refactor | Cloud-native benefits, modernization | Monolith → microservices, containers |
| Repurchase | Existing license conflicts or better SaaS option | On-premise CRM → Salesforce |
| Retire | Legacy systems no longer needed | Deprecated reporting system |
| Retain | Compliance, latency, or specialized hardware | Real-time trading system needing sub-millisecond latency |
Most enterprises use a mix. Rehost your stable workloads quickly to reduce on-premise footprint, then refactor critical apps afterward for optimization.
Establish Your AWS Landing Zone
Before migrating anything, build the target environment. This includes:
- AWS accounts structure: Multi-account design (separate dev/staging/prod, security, networking)
- VPC architecture: CIDR blocks, subnets, availability zones, NAT gateways
- Networking foundations: Direct Connect or VPN for hybrid connectivity during migration
- Identity and access management: Federate your on-premise directory (Active Directory via AWS Directory Service)
- Logging and monitoring: CloudTrail, VPC Flow Logs, CloudWatch
Many teams use AWS Control Tower to automate this. It’s a managed service that sets up a multi-account environment with guardrails and compliance controls. Worth evaluating if you have 20+ accounts in your future state.
Phase 2: Design the Target Architecture
Now design what you’re building in AWS.
VPC and Networking Design
Create a VPC with public and private subnets across multiple availability zones. For a typical 3-tier application:
VPC: 10.0.0.0/16
Public subnets (NAT gateways, ALBs):
- 10.0.1.0/24 (AZ-A)
- 10.0.2.0/24 (AZ-B)
Private subnets (application servers):
- 10.0.11.0/24 (AZ-A)
- 10.0.12.0/24 (AZ-B)
Data subnets (databases):
- 10.0.21.0/24 (AZ-A)
- 10.0.22.0/24 (AZ-B)
Configure security groups to enforce least-privilege access:
Application Security Group:
- Inbound: Port 80, 443 from ALB
- Inbound: Port 3306 (MySQL) from App SG only
- Outbound: All traffic to 0.0.0.0/0 for updates/dependencies
Hybrid Connectivity
During migration, you need connectivity between on-premise and AWS. Options:
AWS Site-to-Site VPN: Quick to set up, sufficient for most migrations. Throughput up to ~1.25 Gbps. Setup takes hours.
Create Virtual Private Gateway (VGW)
Attach to VPC
Create Customer Gateway (on-premise VPN endpoint)
Create Site-to-Site VPN Connection
Configure routing and security groups
AWS Direct Connect: Dedicated network connection, consistent bandwidth, lower latency. Takes weeks to provision (physical installation), but worth it if you’re moving massive datasets or maintaining hybrid infrastructure long-term.
For most migrations, start with VPN, then add Direct Connect if you need persistent hybrid connectivity.
Compute Planning
Decide on instance types based on workload requirements:
- General purpose (M-series): Balanced CPU, memory, networking. Most web applications.
- Compute optimized (C-series): High-performance CPUs. Batch processing, scientific computing.
- Memory optimized (R, X-series): Large datasets in memory. Caching layers, databases.
- Storage optimized (I, H-series): High sequential I/O. NoSQL databases, data warehousing.
Rightsize conservatively at first. Use CloudWatch metrics post-migration to optimize. Don’t assume on-premise CPU utilization translates 1:1—AWS handles tasks differently.
Phase 3: Implementation and Migration Execution
This is where theory meets reality.
Set Up AWS Database Migration Service (DMS)
For databases, AWS DMS is your heavy lifter. It handles schema conversion, data replication, and minimal-downtime cutover.
For a MySQL to RDS migration:
- Create a DMS replication instance (EC2-like instance that runs the migration engine)
- Create source endpoint (on-premise MySQL)
- Create target endpoint (RDS MySQL)
- Create migration task with table mappings and LOB handling
- Test the connection and start migration
Step 1: Create Replication Instance
Class: dms.c5.xlarge (for most migrations)
Multi-AZ: Yes (for reliability)
Publicly accessible: No
VPC: Your migration VPC with access to both source and target
Step 2: Source Endpoint
Engine: MySQL
Server name: your-on-premise-mysql.internal
Port: 3306
SSL: Enable if available
Step 3: Target Endpoint
Engine: Amazon RDS MySQL
Server name: mydb.xxxxx.us-east-1.rds.amazonaws.com
Port: 3306
DMS supports full load + change data capture (CDC) replication. This keeps your RDS database in sync while you’re migrating applications. When ready, you flip DNS and let the replication catch up the final deltas—usually seconds of downtime.
Server Migration with AWS Application Migration Service (MGN)
MGN is purpose-built for lift-and-shift migrations. It replaces older tools like CloudEndure.
How it works:
- Install the MGN agent on source servers (on-premise)
- Agent performs continuous block-level replication to AWS
- Test launches create temporary instances to verify migration before cutover
- Cutover launches final production instances
- Decommission on-premise servers
Step-by-step for a Windows server:
1. In AWS Console, go to Application Migration Service
2. Create replication profile (target region, default VPC, instance type)
3. Download MGN agent installer
4. Install on source server: msi /i agent.msi
5. Agent connects back to AWS, begins replication
6. Monitor: Application Migration Service console shows replication progress
7. Once initial sync complete (5-20 GB/hour typical), test launch
8. Test launch creates temporary instance, verify application works
9. Cutover: Create production instance, wait for final sync, cut DNS/routing
MGN handles the complexity—automatically converts from VMware/Hyper-V/physical, adjusts drivers, handles network configurations.
For large-scale migrations (100+ servers), MGN is the only practical option. The continuous replication model means your cutover window is minutes, not hours.
Storage Migration Strategy
For file shares and NAS:
Use AWS DataSync for efficient, automated data transfer. It validates checksums, handles encryption, and optimizes network bandwidth.
DataSync workflow:
Source: NFS/SMB share on-premise
Destination: EFS, S3, or FSx
Schedule: Incremental syncs hourly/daily
Performance: 10x faster than native NFS replication
For block storage:
If using EBS for on-premise equivalent (SAN volumes), use AWS DataSync or third-party replication tools. Plan for sizing—EBS volumes must be pre-allocated, unlike on-premise arrays that expand dynamically.
Phase 4: Testing and Validation
This is non-negotiable. Test everything before production cutover.
Functional Testing
Run your application test suite against the AWS-hosted infrastructure. Don’t skip this because you “tested migration before.” AWS is different—network timing, disk performance, DNS resolution might behave differently.
Check:
– Application startup and shutdown
– Database connectivity and query performance
– File share access and permissions
– Network latency to external services
– SSL/TLS certificate validation (AWS endpoints might trigger cert warnings)
Performance Testing
Use tools like Apache JMeter, LoadRunner, or k6 to baseline performance:
# Example: Load test a migrated web application
k6 run --vus 100 --duration 5m loadtest.js
Compare against on-premise baselines. AWS networks are fast, but latency profiles differ. Identify bottlenecks early.
Disaster Recovery Testing
Test your backup and recovery procedures in AWS:
- RDS automated backups
- EBS snapshots
- Cross-region replication
- Point-in-time recovery
Verify RPO and RTO meet your SLAs.
Security and Compliance Validation
- Network security: Test security groups, NACLs, firewall rules
- Encryption: Verify encryption in transit (SSL/TLS) and at rest
- Compliance: Run compliance checks for your industry (PCI-DSS scanning, HIPAA validation)
- Access control: Confirm IAM roles and permissions work as intended
Phase 5: Cutover and Go-Live
Your migration moment. Plan meticulously.
Cutover Plan
Document exact sequence:
- Freeze window: Notify users, stop writes to on-premise systems
- Final sync: Run final data replication (DMS CDC, DataSync incremental)
- DNS update: Flip CNAME/DNS records to AWS resources
- Health checks: Monitor application logs, health endpoints, error rates
- Rollback plan: Know exactly how to revert if issues arise (revert DNS, redirect traffic)
Most enterprises target 2-4 AM cutover windows to minimize impact. Allow 6-12 hours monitoring afterward—don’t declare success at T+30 minutes.
Monitoring During Cutover
Have dashboards live:
- CloudWatch metrics (CPU, memory, network)
- Application logs (CloudWatch Logs, centralized logging if available)
- RDS performance metrics
- End-user experience monitoring (synthetic tests)
Use AWS CloudWatch Alarms to alert on anomalies.
Decommissioning On-Premise Infrastructure
Don’t immediately shut down on-premise servers. Keep them running for 2-4 weeks post-migration as a safety net. Monitor AWS systems, verify no late-discovered issues, then decommission.
Week 1 post-cutover:
- Keep on-premise systems running
- Monitor AWS for issues
- Capture any missing data/configuration
Week 2-4:
- Shift non-critical workloads
- Plan storage decommissioning
Week 4+:
- Decommission hardware
- Recover facility space/power
Post-Migration Optimization
Migration complete doesn’t mean you’re done.
Right-Sizing
After 2 weeks of production data, analyze CloudWatch metrics and right-size instances:
# CloudWatch query for CPU utilization
fields @timestamp, @message |
stats avg(CPUUtilization) as avg_cpu, max(CPUUtilization) as max_cpu
by InstanceId
If an m5.2xlarge averages 15% CPU, downsize to m5.large and save money.
Reserved Instances and Savings Plans
After stabilizing, commit to capacity:
- Reserved Instances: 1-3 year commitment, 35-72% discount vs on-demand
- Savings Plans: More flexible, discount applies across instance types/families
For stable, predictable workloads, Reserved Instances are worth it. Use on-demand during initial migration, then switch to RIs after 2 months.
Cost Management
Set up AWS Budgets and cost anomaly detection. Allocate costs by business unit using tags.
Tag all resources:
Environment: production/staging/development
CostCenter: engineering/marketing/finance
Project: migration
Owner: [email protected]
Use AWS Cost Explorer to track spending by tag. Most enterprises see immediate 30-50% reduction vs on-premise TCO after optimization.
Common Pitfalls and How to Avoid Them
Underestimating bandwidth requirements: Don’t rely on your ISP’s rated speed. Actual throughput is lower. For multi-TB data, consider AWS Snowball.
Ignoring DNS propagation: TTLs matter. Lower TTLs 24 hours before cutover, or you’ll have stragglers connecting to old systems.
Insufficient testing: The team pushing for “just go live” without testing is setting you up for 2 AM incidents. Test ruthlessly.
Forgetting backup strategies: On-premise teams often assume “IT will handle it.” In AWS, YOU configure backups. Document RDS automated backups, EBS snapshot schedules, and cross-region replication before go-live.
Not planning hybrid infrastructure long enough: Many teams cut over too fast and miss on-premise dependencies. Plan 30+ days of overlap minimum.
Inadequate capacity planning: AWS auto-scaling helps, but plan initial capacity for peak load, not average.
Tools and Services Summary
| Tool | Purpose | Cost |
|---|---|---|
| AWS Application Migration Service (MGN) | Server replication and cutover | Free to use; pay for EC2 during migration |
| AWS Database Migration Service (DMS) | Database migration with CDC | $0.30/hour for replication instance + data transfer |
| AWS DataSync | Large-scale data transfer | $0.0125/GB transferred |
| AWS Application Discovery Service | Dependency mapping | Agentless free; agent-based $0.10/instance/day |
| AWS Snow family | Physical data transfer for massive datasets | $0.30/TB (Snowball) |
For learning and optimization, AWS Free Tier includes 12 months of free micro instances and RDS, perfect for testing your architecture before production migration.
Conclusion: Your Migration Roadmap
Migrating on-premise servers to AWS is achievable, but it’s not a side project. It requires:
- Proper assessment of your current state (infrastructure inventory, TCO analysis)
- Clear strategy on migration approach (6 Rs) and target architecture
- Right tools (MGN for servers, DMS for databases, DataSync for storage)
- Rigorous testing before cutover
- Planned cutover with rollback options
- Post-migration optimization for cost and performance
Most teams successfully migrate their first 20-30 servers and learn from mistakes. Don’t let those mistakes happen with your most critical applications—start with less critical workloads, validate your process, then scale.
The teams that execute this well report 30-50% TCO reduction, 60%+ improvement in deployment velocity, and significantly reduced operational overhead. That’s the payoff for getting the process right.
Next steps: Start with Phase 1 assessment this week. Pick your first 5-10 candidate servers, non-critical applications. Get hands-on with MGN and DMS in a test environment. Then apply that learning to your broader migration wave planning.