Introduction
Every migration that went badly had the same property: the team treated migration day as the starting point for the hard decisions. Should we fail over DNS or repoint at the load balancer? What's our rollback criteria? How long do we wait before declaring a failure? Who has authority to call the abort? These are not questions to answer during a production cutover. They're questions that need documented, tested answers weeks in advance.
Cloud migration preparation is the work that happens between "we've mapped our dependencies" and "we're flipping the switch." It's the migration rehearsals that validate the sequence actually works. It's the DNS TTL reductions that eliminate a forty-eight-hour propagation window from the critical path. It's the rollback runbook that's been tested, not just written. It's the monitoring that's been configured in the AWS environment before the first production byte arrives.
Teams that treat migration day as execution of a well-rehearsed plan have short outage windows and high first-attempt success rates. Teams that treat migration day as a first run have long outage windows, high adrenaline, and a second migration attempt scheduled for the following month.
What "Migration Ready" Actually Means
The common definition of migration readiness is infrastructure readiness: the VPC is built, the EC2 instances are sized, the security groups are configured, the RDS instance is running. That's not migration readiness. That's environment readiness. Migration readiness means the environment has been validated, the cutover procedure has been rehearsed, the rollback path has been tested, and the team can answer every critical question about what happens during the cutover window without looking anything up.
The distinction matters because environment readiness is visible and measurable. You can tick boxes: VPC created ✓, IAM roles configured ✓, Security groups applied ✓. Migration readiness is harder to measure because it's about knowledge state, rehearsal confidence, and decision authority: none of which appear on a checklist.
The specific gaps that appear when teams have environment readiness without migration readiness:
The untested application. The AWS environment is configured, but nobody has run a realistic load test against the migrated application to validate that it performs acceptably. The configuration looks right. The application starts. But under production load, something fails: a connection pool that's too small for the actual request rate, a cache that isn't warm, a timeout value that worked with 5ms database latency but fails with 12ms. The team discovers this during the cutover window, not during pre-migration testing.
The untimed procedure. The migration runbook exists but has never been timed. The team allocated a four-hour maintenance window. The actual procedure takes six hours because step four, draining connections from the load balancer, takes forty minutes when documented as a five-minute step. The maintenance window expires mid-migration. The team has to decide whether to keep going past the window, complete under pressure, or roll back incomplete.
The untested rollback. Every migration plan has a rollback section. Most rollback sections have never been executed. The rollback assumes the on-premises environment is unchanged and can receive traffic again on short notice. What it doesn't account for: the database connections that need to be re-pointed, the application configuration that was changed to use AWS endpoints, the DNS records that have partially propagated, the monitoring that was switched to the AWS environment and needs to switch back.
The absent decision-maker. Something unexpected happens during the cutover. The migration runbook doesn't cover it. Someone needs to decide whether to continue, wait, or abort. If that decision requires the CTO and the CTO is unreachable, the team stalls. Pre-migration readiness includes a documented decision authority matrix: who can make which decisions, who needs to be notified, and who has authority to call an abort.
AWS Deep Dive: The Technical Preparation That Determines Migration Day Outcome
DNS TTL: The Preparation Step with the Longest Lead Time
DNS TTL reduction is the single preparation step with the longest required lead time and the one most commonly done too late. Most production DNS records have TTLs of 300 seconds (5 minutes) to 3600 seconds (1 hour). Some have TTLs of 86400 seconds (24 hours). The TTL value determines how long a DNS resolver caches the record after it's been resolved, which determines how quickly traffic shifts when you change the record.
If you change a DNS record that has a 3600-second TTL, some resolvers will continue using the old value for up to an hour. If you change a record with a 24-hour TTL, some resolvers will use the old value for up to 24 hours. For a migration where you need traffic to shift to the AWS environment within minutes of cutover, a 24-hour TTL means your cutover window is actually 24 hours long: not the 2-hour window on the migration plan.
The preparation: reduce TTLs to 60-300 seconds at least 72 hours before migration day. This gives existing cached records time to expire at the old TTL value, after which resolvers will cache the new low-TTL value. By migration day, the maximum propagation delay after a DNS record change is 60-300 seconds.
# Check current TTL values for records you'll be changing
dig +nocmd api.yourcompany.com A +noall +answer
# In Route 53, update TTL before migration day
aws route53 change-resource-record-sets \
--hosted-zone-id Z1234567890 \
--change-batch '{
"Changes": [{
"Action": "UPSERT",
"ResourceRecordSet": {
"Name": "api.yourcompany.com.",
"Type": "A",
"TTL": 60,
"ResourceRecords": [{"Value": "203.0.113.10"}]
}
}]
}'
Update the TTL only: not the record value. The record still points to the on-premises IP. You're just reducing the propagation window so that when you change the value on migration day, the change takes effect in 60 seconds instead of 3600.
The non-obvious Route 53 behavior: when you change a record's TTL in Route 53, the change propagates to Route 53's name servers within 60 seconds. But resolvers that have already cached the record at the old TTL will keep serving the old cached value until their cache entry expires. A record with a 3600-second TTL reduced to 60 seconds will still be cached at 3600 seconds by any resolver that cached it before the TTL change. This is why the preparation needs to happen 72 hours in advance, to give the existing cache entries time to expire naturally.
Migration Rehearsals: Running the Procedure Before It Counts
A migration rehearsal is a full execution of the migration procedure against a non-production target, timed, with all participants present, under conditions as close to the real migration as practical. It has two outputs: validation that the procedure works, and a realistic time estimate for each step.
The rehearsal schedule that produces migration-ready teams:
Rehearsal 1 (T-4 weeks): Full migration procedure executed against a staging environment. No time pressure. Stop at each step, verify the outcome, document what actually happened versus what the runbook said. Update the runbook with corrected steps and realistic time estimates. Identify any steps that require access or permissions that aren't yet set up.
Rehearsal 2 (T-2 weeks): Full migration procedure executed against a staging environment with a target maintenance window. If the window is four hours, run the rehearsal with a four-hour limit. If the procedure takes five hours, the maintenance window needs to be extended or the procedure needs to be shortened before migration day.
Rollback rehearsal (T-1 week): Execute the rollback procedure from a partially complete migration state. If the migration is aborted after step 6 of 12, what does rollback look like? Is the application in a consistent state that can receive on-premises traffic again? This is the rehearsal most teams skip and the one that determines whether an aborted migration recovers cleanly or makes things worse.
The specific AWS configuration to validate during rehearsals:
# Validate that ELB health checks pass for migrated application
aws elbv2 describe-target-health \
--target-group-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/api-prod/abc123 \
--query 'TargetHealthDescriptions[*].{Target:Target.Id,State:TargetHealth.State,Reason:TargetHealth.Reason}'
# Validate that RDS can accept connections from migrated application tier
aws rds describe-db-instances \
--db-instance-identifier api-prod-db \
--query 'DBInstances[0].{Status:DBInstanceStatus,Endpoint:Endpoint.Address,Port:Endpoint.Port}'
# Validate CloudWatch alarms are in OK state (not INSUFFICIENT_DATA or ALARM)
aws cloudwatch describe-alarms \
--alarm-names "api-prod-error-rate" "api-prod-latency-p99" "api-prod-healthy-hosts" \
--query 'MetricAlarms[*].{Name:AlarmName,State:StateValue}'
The CloudWatch alarm state check is the pre-flight validation that confirms observability is functioning before traffic arrives. An alarm in INSUFFICIENT_DATA state means the metric hasn't been received yet: the application isn't emitting the metric, the metric namespace is wrong, or the log group isn't configured correctly. Discovering this during the cutover means you're flying blind. Discovering it during the rehearsal means you fix it before migration day.
The Rollback Decision Framework
Every migration needs a pre-defined rollback criteria, the specific conditions under which the team aborts the migration and reverts, agreed upon before migration day. Post-migration is the wrong time to develop this criteria because the team is under pressure, the window is closing, and the temptation is to keep trying rather than abort.
A rollback criteria framework with clear thresholds:
Automatic rollback (no discussion required):
├── Application error rate > 5% sustained for more than 5 minutes
├── P99 latency > 2x pre-migration baseline for more than 5 minutes
├── Health check failure rate > 20% on any target group
└── Data loss detected in any transaction validation check
Leadership decision required (defined escalation path):
├── Maintenance window elapsed with migration incomplete
├── Single critical dependency unavailable with no ETA
└── Application functional but performance degraded 20-50% vs. baseline
Continue:
├── Brief error spikes during DNS propagation (< 2 minutes, < 1% error rate)
├── Expected application warm-up period (first 5 minutes post-cutover)
└── Minor latency increase < 20% that may resolve with cache warming
The "automatic rollback" category is the most important. These are conditions where the team does not deliberate: the runbook says roll back, and they roll back. The value of pre-defining these is that an engineer doesn't have to make a judgment call under pressure at 2am about whether a 6% error rate is "close enough to 5%" to trigger rollback. The threshold is 5%. It's 6%. Roll back.
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
Migration preparation depth is a function of the cost of downtime for the specific application and the reversibility of the migration.
Light preparation (low-revenue-impact application, easy rollback path): Two rehearsals, 72-hour TTL reduction, documented rollback criteria. Total preparation time: one to two weeks. Appropriate when application downtime costs less than the preparation overhead, or when the application can tolerate a second migration attempt if the first fails.
Standard preparation (revenue-critical application, multi-hour rollback window): Three rehearsals including rollback rehearsal, 72-hour TTL reduction, pre-migration load test against the AWS environment, full monitoring validation, documented decision authority matrix. Total preparation time: three to four weeks. Appropriate for most SaaS applications, internal business-critical systems, and e-commerce platforms.
Deep preparation (payment processing, healthcare, financial trading): Four rehearsals including two rollback rehearsals from different failure points, canary traffic routing to validate production behavior before full cutover, parallel run period where both environments process transactions simultaneously for validation, legal and compliance sign-off on the cutover procedure. Total preparation time: six to eight weeks minimum. Appropriate when a failed migration has regulatory consequences, financial penalties, or patient-safety implications.
The honest answer on maintenance window length: Teams almost always underestimate maintenance windows by 30-50%. The rehearsal is the calibration tool. Whatever time the rehearsal takes, add 30% buffer for migration day, unfamiliar environments, unexpected questions, stakeholder communication overhead, and the fact that people perform slightly slower when the stakes are real. A rehearsal that takes three hours should have a four-hour maintenance window.
Lessons From the Field
1. The maintenance window that starts late is the one that exceeds its time limit. At a logistics client, migration day started thirty minutes late because a required stakeholder hadn't joined the migration call on time. The procedure was planned for a four-hour window. Starting late meant finishing at 2:30am instead of 2:00am, past the hard deadline imposed by early-morning batch processing that couldn't be delayed. The team rushed the final steps, skipped the post-migration validation, and discovered two issues the following morning that had been introduced in the rush. Start on time, or delay the migration. There is no "we'll make it up later."
2. Rollback plans that require the on-premises environment to be unchanged will fail if the migration took longer than planned. At a fintech client, the rollback plan assumed that if the AWS migration failed, traffic could return to the on-premises environment within thirty minutes. What the plan didn't account for: the on-premises application had been put into read-only mode at migration start to prevent write conflicts. Putting it back into read-write mode required a configuration change and a service restart, another twenty minutes. The actual rollback time was fifty minutes, not thirty. Test your rollback against realistic on-premises state, not an idealized one.
3. Load testing in AWS before migration day surfaces configuration issues that a standing environment never will.
Ran a load test against the AWS environment for a SaaS client two weeks before migration day, simulating peak traffic. The test revealed that the RDS instance's parameter group had max_connections set to the default for the instance class, insufficient for the connection pool configuration the application used. The application worked fine at low traffic volumes. At peak load, connection pool exhaustion caused 503 errors. Fixed two weeks before migration. Without the load test, we would have discovered this at the worst possible moment: during peak traffic after cutover.
4. The first person to say "maybe we should roll back" is usually right. In every migration I've participated in where the rollback decision was delayed, the outcome was a longer outage than if rollback had been called when it was first suggested. There's social pressure to keep going: the team has been working toward this moment for months, rolling back feels like failure, and the person who calls it absorbs the discomfort of that decision. The rollback criteria document transfers that decision from a social dynamic to a technical threshold. When the criteria are met, rollback is the runbook instruction, not a personal judgment call.
5. Post-migration validation is not optional, even when the window is closing. A retail client completed their migration with thirty minutes to spare in the maintenance window. The team was ready to declare success and end the call. I insisted on running the five-minute post-migration validation checklist before declaring success. The checklist caught a misconfigured CloudWatch alarm that had been set to notify the wrong SNS topic: the monitoring team wouldn't have received production alerts until the next test. Fix took three minutes. The remaining twenty-seven minutes were spent confirming everything else was correct before closing the window. Rushing past post-migration validation to end the call early is the most common way to introduce problems that don't surface until 6am the next morning.
Final Thoughts
The tools for migration preparation are improving. AWS Migration Hub now provides a migration workflow that tracks preparation tasks alongside execution tasks, making the pre-migration checklist a first-class part of the migration project rather than a separate document. Application Migration Service's test instance capability makes rehearsal easier: you can launch a test instance from your replication data, run the full validation procedure, and terminate it without disrupting the ongoing replication.
What tooling improvements don't change is the human discipline of actually doing the preparation. Running rehearsals, conducting load tests, reducing DNS TTLs, documenting rollback criteria: these are all technically straightforward. The reason teams skip them is always the same: there isn't enough time in the migration project plan, the deadline is fixed, and the preparation work compresses first because it feels like overhead rather than execution.
The teams that consistently execute clean migrations treat the preparation phase as the migration itself: the cutover is just the moment the preparation becomes visible. The four hours of migration day are the output of six weeks of readiness work. And the migrations that fail on cutover day almost always had a preparation phase that was too short, too rushed, or too theoretical to catch the specific problems that surfaced.
Key Takeaways
- DNS TTL reduction must happen 72 hours before migration day, not the day before. Records cached at the old TTL will continue serving the old value until the cache entry expires. Reducing TTL to 60-300 seconds 72 hours in advance ensures that by migration day, any DNS record change propagates in under 5 minutes.
- Maintenance windows must be sized from rehearsal data, not estimates. Whatever time a rehearsal takes, add 30% buffer for migration day. A procedure that takes 3 hours in rehearsal needs a 4-hour maintenance window, unfamiliar environments, stakeholder communication, and the slower pace under real stakes always extend the actual cutover time.
- CloudWatch alarm state must be validated before traffic arrives. An alarm in
INSUFFICIENT_DATAstate means the metric hasn't been received, observability is broken before the migration starts. Discover this in the rehearsal, not during the cutover when you need it to work. - Rollback criteria must be pre-defined as specific thresholds, not judgment calls. Automatic rollback conditions (error rate > 5%, P99 latency > 2x baseline) remove the social pressure of making that call under stress. When the threshold is met, the runbook says roll back. No deliberation required.
- Rollback rehearsal is the most skipped and most valuable preparation step. The rollback plan that's never been executed assumes conditions (on-premises environment unchanged, services can restart in X minutes) that often don't hold. Run a rollback from a partially complete migration state to find out what actually happens.
- Load testing in the AWS environment before migration surfaces configuration issues that standing environments never reveal. Connection pool limits, cache size defaults, timeout values tuned for LAN latency: these behave correctly under low traffic and fail under production load. Discover them two weeks before migration day, not during the cutover window.
- The first person to suggest rolling back is usually right. Pre-defined rollback criteria convert the rollback decision from a social judgment to a technical threshold, removing the pressure to keep going when conditions indicate the migration isn't working.
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.