When you need to move servers, the first thing that comes to mind is a notice like "Scheduled maintenance, 2–6 a.m. on the ○th." The pressure to finish within that window means all the migration work gets crammed into one go, and if something goes wrong it's hard to roll back.
We've built AWS environments (EC2 · RDS · ALB · Auto Scaling) and carried out zero-downtime migrations ourselves. The principle we kept was simple: build the new environment completely first, shift traffic over a little at a time, and always keep a way back. This post walks through that process step by step.
Step 1: Write down what you have now
Before moving anything, summarize on one page what your current servers are made of. Without this table, you only discover missing settings in the new environment on migration day.
| What to check | Examples |
|---|---|
| Servers · runtime | Web servers, batch jobs, scheduled jobs (cron) |
| Data | Database, uploaded files, session store |
| External connections | Payment · SMS · email · external API keys, allowlisted IPs |
| Domain · certificates | DNS settings, HTTPS certificate expiry dates |
In particular, check whether any external service is registered as "allow access only from this IP." If you don't register the new server's IP in advance, payments or integrations can break the moment you switch over.
Step 2: Finish the new environment first
Build the new environment separately, alongside the current one, without touching it. Set up the servers (EC2), the database (RDS), the load balancer that distributes traffic (ALB) and Auto Scaling, which automatically adds servers as traffic grows. Then verify each feature through a test address, with no real traffic.
This approach is commonly called blue/green deployment. The side currently in production is blue, and the newly built side is green. The official AWS blog also describes blue/green as a way to deploy and roll back with almost no downtime.
Step 3: Keep the data in sync
This is the most delicate step, because new data such as orders and sign-ups keeps coming in during the move. So rather than copying once and calling it done, set things up so changes in the old database keep flowing into the new one, and only then switch over. For uploaded files, either share the same storage or sync them once more just before switching.
- Compare row counts and latest record times between the two databases
- Decide in advance whether to pause writes briefly just before switching
- Take one extra, separate backup
Step 4: Shift traffic over gradually
ALB lets you put multiple target groups on one rule and split traffic by weight. As in the official AWS blog example, setting the weights to 9 to 1 sends only about 10% of traffic to the new environment. Watch errors and response times, and if all looks good, move step by step to 5 to 5, then 0 to 10.
To keep the same user from bouncing between the two environments, also look at keeping the target group stickiness duration short. The AWS blog recommends 5 minutes or less when sending only a portion as a trial, and 1 minute or less for a full cutover.
Want to check this against your own data?AI Readiness Assessment · we review your material and map candidates and orderContact usStep 5: Keep a way back, then clean up at the end
Even after everything has moved to the new environment, don't delete the old servers right away. Leave them for a few days so you can simply revert the weights if a problem shows up. Once you've confirmed things are running stably, clean up the old servers and temporary settings.
There are also AI features that pair well with a migration: having AI summarize accumulated server logs by day, or, when several incident alerts arrive, grouping those with the same cause and summarizing them in one sentence. Designing these alongside the migration is easier than bolting them on later.
Summary
| Step | One-line summary |
|---|---|
| 1 | Table your current setup, external integrations and allowlisted IPs |
| 2 | Finish the new environment alongside the old one first |
| 3 | Keep data in sync and compare |
| 4 | Shift traffic gradually with weights |
| 5 | Keep the old servers for a few days, clean up later |
References
- AWS News Blog, Application Load Balancer simplifies deployment with weighted target groups: https://aws.amazon.com/blogs/aws/new-application-load-balancer-simplifies-deployment-with-weighted-target-groups/
- AWS DevOps Blog, Fine-tuning blue/green deployments on application load balancer: https://aws.amazon.com/blogs/devops/blue-green-deployments-with-application-load-balancer/
Walk us through your workflow and we'll suggest where AI fits and the expected scope.