I. Preparation
Before you begin, make sure you have the following information and permissions:
- AWS Account: Activated and authorized to create EC2, VPC, and MGN.
- DigitalOcean Account: Root access (SSH) to the Droplet to be migrated.
- AWS IAM User: Create an IAM User with the AWSApplicationMigrationAgentInstallationPolicy permission to obtain the Access Key ID and Secret Access Key.
II. Steps
Step 1: Initialize the VPC
Initialize the VPC as the environment for the server to migrate to AWS.
- Go to VPC → Create VPC to create a VPC with the following configuration:
- Verify the VPC after initialization.
Step 2: Initialize AWS MGN
If this is your first time using MGN in this Region, you need to initialize the service:
- Log in to the AWS Console.
- Search for and select the AWS Application Migration Service.
- Click Get started to initialize MGN:
- On the Replication settings screen → Edit, configure the template for the Replication instance:
- Staging area subnet: Select the subnet in the VPC that you want to use to receive temporary data.
- Replication Server instance type: Select the instance type that suits your needs; it will usually have a configuration equivalent to the server on DO.
- Leave the remaining items as default.
- Click Save template.
- Go to Launch template → Edit to configure Launch template.
- Uncheck "Activate instance type right-sizing" to customize the configuration.
- Select SG and instance type.
Step 3: Install the Replication Agent on the DigitalOcean Droplet
This step connects the Droplet to AWS. You need to SSH into your Droplet and change the password for the "root" account.
Note: You need to back up your server on DO before proceeding.
- In the AWS MGN Console, select the Source servers menu.
- Click the Add server button.
- Select the operating system (Linux or Windows). For example, select Linux.
- Copy the two commands provided by AWS to download and install the Agent. They will look like this:
sudo wget -O ./aws-replication-installer-init https://aws-application-migration-service-ap-southeast-1.s3.ap-southeast-1.amazonaws.com/latest/linux/aws-replication-installer-init
sudo chmod +x aws-replication-installer-init; sudo ./aws-replication-installer-init --region ap-southeast-1
- After running the command, enter the Access Key ID & Secret Access Key and select the hard drive to sync to AWS. The installation process will then take approximately 5-10 minutes to complete, and the AWS Replication Agent will begin replicating data to AWS.
Step 4: Configure Launch Settings (Configure the Target Server)
After installing the Agent, the Droplet will appear in the list of Source servers on AWS MGN. At this point, AWS is starting to synchronize data (Initial Sync). While waiting, configure the target server (an EC2 will be created).
- Click on the server name that appears in the list.
- Select the Launch settings tab.
- In the EC2 Launch Template section, click Edit.
- The Launch Template window will appear; you need to edit the important parameters for the target server:
- Instance Type: Select the desired server configuration (e.g., t3.medium, c5.large,...)
- Subnet: Select the subnet where EC2 will officially run.
- Save the Launch Template.
Step 5: Launch Test Instance
5.1 Launch Test Instance
This step will guide you on how to launch a test instance after the data migration process is complete.
- Wait for the replication process to complete; the Migration lifecycle column will show "Ready for testing" and the Data replication status will show "Healthy".
- Tick Server → Test and cutover → select Launch test instances.
- Lifecycle will now switch to Test in progress.
5.2 Verify Test instance
This step will verify that the created test instance has been successfully tested.
- Wait for the test instance launch process to complete; MGN will display a notification like the one shown in the image.
- In EC2, you will see an EC2 instance with a hostname similar to the Source Server that has been created.
- Go to MGN → Launch history to view the test instance launch log.
5.3 Launch Cutover
This step will perform a cutover to launch the official EC2 instance.
- Go to MGN → select server → Test and cutover → Mark as Ready for cutover to delete the test instance.
- Wait for the migration lifecycle to change to Ready for cutover → click Test and cutover → Launch cutover instances
5.4 Verify the Cutover process and check that the data has been migrated.
- Upon accessing EC2, you will see that MGN has created an EC2 instance configured according to the Launch template. This EC2 instance was created from snapshots that were replicated previously.
5.5 Finalize cutover
The finalize cutover will mark the end of the migration process, and MGN will stop data from the source to AWS.
I will address the issues encountered during the migration process in a later article. Thank you for taking the time to read.















Top comments (0)