Home / Blog / Project stories

How to Move Your Servers to AWS Without Taking Your Service Down

Project storiesSOL LABS AI3 min read

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 checkExamples
Servers · runtimeWeb servers, batch jobs, scheduled jobs (cron)
DataDatabase, uploaded files, session store
External connectionsPayment · SMS · email · external API keys, allowlisted IPs
Domain · certificatesDNS 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.

The key is not moving everything at once. If something goes wrong, only some users see it briefly, and reverting the weights sends traffic straight back to the old servers.

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 us

Step 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

StepOne-line summary
1Table your current setup, external integrations and allowlisted IPs
2Finish the new environment alongside the old one first
3Keep data in sync and compare
4Shift traffic gradually with weights
5Keep 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/
Would this architecture fit your work?

Walk us through your workflow and we'll suggest where AI fits and the expected scope.

Contact usStart with the 3-minute AI readiness check →
SOL LABS AI

We build web apps, mobile apps and business systems, then add and run the AI they need. We build and operate our own meeting notes, contract and company analysis AI.

See our projects
Get the next post by email?

Related posts