AWS’s new Application Migration service is a tool for performing Lift-and Shift migrations, where servers are copied entirely automatically, and lifted to the cloud, where application service is transferred over. It’s easy to use, and can move servers with minimal downtime.

What Is AWS Application Migration Service?

Recently, AWS launched Application Migration Service, called AWS MGN for short. It’s based on CloudEndure Migration, an older company AWS bought and has been running for some time. Now, AWS recommends using MGN, which is a first-class feature of the AWS ecosystem.

The process is very simple. You install the MGN Replication Agent on the server you want to migrate, and configure it in the MGN Management Console. It copies the OS, applications, and all data, and transfers them to a staging environment made of low cost EC2 instances.

Then, when the transfer is complete, these EC2 instances can be converted into the high-powered instances you’ll use for production, and the original server can be shut off.

Of course, this is simply a lift-and-shift migration. Moving your servers directly to AWS won’t change anything about your network right away. What it does give you is a starting point in the cloud, and the ability to slowly modernize your infrastructure using AWS services.

For example, maybe you have a small service running on the machine that could be better off as an AWS Lambda function, or maybe you’re running an internal database that could be better off if it was moved to AWS RDS.

Either way, moving to the cloud is something most businesses are doing nowadays, and AWS’s Application Migration Service makes it extremely easy.

Moving Servers With AWS MGN

First, you will need to set up the replication in the MGN Management Console. Head over there, and click “Get Started,” or create a new settings template from the sidebar.

The main thing you’ll need to configure is which replication server instance to use. This is only temporary, but you’ll want to choose something that you can at least test your network on before swapping to production-grade instances. For most lightweight workloads though, t2.small should be fine for a server that isn’t receiving traffic.

You’ll also need to select a subnet, whether or not you want a hard drive based EBS instance, and any additional security groups (AWS’s firewall system) you may want.

Then, you’ll need to download the MGN Replication Agent to your server. This is a Python script, but it’s region-dependent. You’ll need to replace “REGION” in the following command with the AWS region that you’re transferring the servers to, which is displayed in the top right of the management console.

Then, you will need to run it with administrator privileges with sudo python3 aws-replication-installer-init.py. You may need to install python3 if your system doesn’t have it already.

Once run, the server will be added to the MGN Console. You’ll be able to monitor the progress of the data transfer from here.

Once it’s ready for testing, you’ll be able to launch test images by selecting all the servers you wish to launch and selecting “Launch Test Instances”.

Then, once it’s ready to be swapped to the new machine, you can launch cutover instances using the Launch Settings defined for each server in the console.