22. Migration & Modernization
Migration & Modernization
TL;DR
- The 6Rs (Rehost, Replatform, Repurchase, Refactor, Retire, Retain) are a business decision framework based on application value and technical debt, not a technical checklist.
- Application Migration Service (MGN) is purpose-built for rehosting at scale: continuous block-level replication with minimal-downtime cutover.
- Database Migration Service (DMS) enables live-source, zero-downtime database migration via CDC-based continuous replication.
- DataSync provides robust large-scale data transfer with integrity verification and incremental sync; preferable to hand-rolled scripts.
- Migration Hub provides portfolio-level visibility across concurrent migration streams.
- Mainframe Modernization offers replatform and refactor paths; full rewrite is the highest-risk, highest-cost option and should not be the default.
Core Concepts
The 6Rs: Business-Driven Classification
A portfolio of 200 applications genuinely warrants 6 different strategies. Applying one strategy uniformly (e.g., “refactor everything”) burns engineering time on applications that don’t need it.
Rehost (Lift & Shift): Move the application to AWS with minimal changes. Candidate: a legacy internal tool rarely touched, little business value. Risk: low. Cost: low. Timeline: fast.
Replatform (Lift, Tinker, & Shift): Move the application and update it to leverage AWS services. Candidate: a mid-tier application with some technical debt. Risk: moderate. Cost: moderate. Timeline: moderate.
Repurchase (Drop & Shop): Replace the application with a SaaS alternative. Candidate: a commodity application (email, ticketing, CRM). Risk: moderate (vendor lock-in). Cost: often lower (no maintenance). Timeline: fast.
Refactor (Re-architect): Rewrite the application for cloud-native patterns. Candidate: a customer-facing revenue system with technical debt blocking feature velocity. Risk: high. Cost: high. Timeline: long.
Retire: Shut down the application. Candidate: a deprecated or superseded application generating little value. Risk: low (if dependencies are clear). Cost: none. Timeline: immediate.
Retain: Keep the application on-premises or defer migration. Candidate: an application with specialized hardware, regulatory constraints, or unclear business case for migration. Risk: low. Cost: none. Timeline: indefinite.
Decision process: For each application, estimate business value, technical debt level, and migration effort. Apply the 6R that optimizes for actual business outcomes, not architectural purity.
Example: A legacy internal tool (low value, low debt) is a Rehost/Retire candidate, not a Refactor candidate. Refactoring wastes engineering time on an application that doesn’t need it.
Application Migration Service: Rehosting at Scale
MGN handles the mechanics of rehosting: continuous, block-level replication of entire servers to AWS.
Process:
- Install replication agent on source servers.
- MGN continuously replicates blocks to AWS (EBS snapshots).
- Test cutover in a non-production environment.
- Execute final cutover (traffic switches to AWS instances in minutes).
Benefit: Because replication has been running continuously, the final cutover is minimal downtime (minutes, not hours or days). Data is already there; only DNS/routing changes.
Alternative (manual process): Create an AMI from the source server, launch an EC2 instance, and switch. Slower, riskier, and dependent on understanding the source server environment.
Database Migration Service: Live-Source Migration
DMS replicates a source database to a target while the source continues serving production traffic.
Two phases:
- Full load: Replicates the entire source database schema and data to the target.
- CDC (Change Data Capture): Continuously replicates changes (inserts, updates, deletes) to the target.
Benefit: The source stays live and serving traffic during migration. The cutover is brief: switch applications to point to the target (when changes are fully replicated). Downtime: seconds to minutes, not hours.
Alternative (big-bang migration): Shut down the source, replicate all data, switch to target. Downtime: extended (hours or more).
Use case: Production databases with uptime requirements. Big-bang migration introduces unacceptable risk.
DataSync: Robust Large-Scale Data Transfer
DataSync moves data between on-premises storage and AWS (S3, EFS, Glacier) or between AWS services.
Features:
- Integrity verification: Checksums verify data wasn’t corrupted in transit.
- Incremental transfer: Subsequent syncs only copy changed files, reducing bandwidth.
- Bandwidth throttling: Doesn’t saturate WAN links; respects network constraints.
- Managed service: No infrastructure to provision or maintain.
Comparison to custom scripts:
- Custom script: Developer writes S3 sync code. Partial failure is unclear (which files transferred?). Retries are manual. Bandwidth saturation causes WAN issues.
- DataSync: Built-in integrity checking, incremental transfer, bandwidth controls, visibility into success/failure.
Migration Hub: Portfolio Visibility
Migration Hub aggregates status and metrics from multiple migration tools (MGN, DMS, DataSync, etc.) into a single view.
Benefit: When running 50+ concurrent migrations, checking each tool’s console separately is untenable. Migration Hub provides portfolio-level progress, blockers, and resource utilization.
Mainframe Modernization: Replatform vs. Full Rewrite
Assumption: “Mainframe migration means a full rewrite.”
Reality: Full rewrite is the highest-risk, highest-cost option and should not be the default.
AWS Mainframe Modernization service offers:
- Automated refactoring: Convert COBOL to Java automatically (with manual cleanup required).
- Replatforming: Run existing COBOL on a modernized runtime (e.g., Micro Focus Enterprise Server on EC2/ECS).
Trade-offs:
- Full rewrite: Highest risk (business logic changes), highest cost (complete rebuild), longest timeline (months/years).
- Replatform: Lower risk (code stays as-is), lower cost (infrastructure migration only), faster (weeks/months).
- Refactor: Medium risk (code conversion + manual work), medium cost and timeline.
Decision: Start by evaluating replatform; it often delivers 80% of the business benefit (modernized infrastructure, cloud-native operations) at 20% of the cost/risk of a full rewrite.
Common Pitfalls
| Pitfall | Why | Fix |
|---|---|---|
| Applying one migration strategy portfolio-wide | “Refactor everything” burns engineering time on low-value applications that should be retired or rehosted. | Classify each application by actual business value and technical debt. Apply the 6R that fits. |
| Confusing MGN and DMS | MGN is for server/application rehosting; DMS is for databases. Using MGN for a database-only migration is wrong. | Understand MGN handles server replication; DMS handles database-specific needs (CDC, live-source migration). |
| Planning a big-bang database cutover | Source database is down for hours during full replication. High risk and downtime. | Use DMS’s CDC-based continuous replication. Cutover is brief (minutes); source stays live during migration. |
| Hand-rolling large data transfer scripts | Partial failures are unclear. Retries are manual. Bandwidth saturation affects WAN. | Use DataSync for large transfers. Built-in integrity verification, incremental transfer, and bandwidth controls. |
| Assuming mainframe migration = full rewrite | Highest cost, highest risk, longest timeline. | Evaluate replatform first (modernized runtime, existing code). Refactor/rewrite only if replatform doesn’t meet requirements. |
| No cutover rehearsal before go-live | Real cutover fails in ways the non-production test didn’t reveal. Emergency rollback is chaotic. | Run cutover rehearsals in non-production environments. Test rollback plans. Validate target environment. |
Interview Questions
-
You’re handed a 150-application migration portfolio. Walk me through how you’d triage it into the 6Rs. — Tests whether the candidate applies real judgment per application based on business value and technical debt, not a blanket strategy.
-
A database migration needs near-zero downtime for a system processing live transactions 24/7. Design the approach. — Tests understanding of DMS CDC replication as the mechanism to achieve live-source, minimal-downtime migration.
-
Leadership assumes a mainframe migration is a two-year full rewrite. How do you push back and present an alternative? — Tests whether replatform and refactor paths are understood as lower-risk, lower-cost alternatives with comparable business benefit.
-
A large-scale data transfer script failed partway through. You don’t know which files copied successfully. How would you have prevented this? — Tests understanding of DataSync’s built-in integrity verification as superior to custom scripts.