DEV Community

Cover image for Perform Lift and Shift migration with application migration service
Akshay Rao
Akshay Rao

Posted on

Perform Lift and Shift migration with application migration service

Introduction

Advantage of AWS Application migration service

  1. Primary migration service to do Lift and Shift Migration to AWS.
  2. Allows physical, virtual and cloud server to migrate without any compatibility issue or performance disruption.
  3. Simplifies and reduces cost of migrating servers and application to AWS.

The difference between the AWS Application migration service(MGN)and AWS server migration service(SMS) is that MGN uses continuous, block level replication and enables short cut over windows in minutes but in SMS uses incremental, snapshot based replication and the cutover windows are in hours, So according to the requirement one can choose.
In this blog I tried to migrate a linux server from Singapore region to Mumbai region.

Let’s start

Login to AWS account, choose Singapore region and launch a normal linux instance.

Now switch back to Mumbai region, a search for Application Migration Service.
I was directed to create a launch template, choose all the things I wanted like instance type, security group, subnet and all the necessary specification for the launch.

Clicked on add server and created a IAM user “mgn-agent-installer” and gave the ACCESS id and key.


Now logged into the linux instance (Singapore region) and executed these commands.


wget -O ./aws-replication-installer-init.py https://aws-application-migration-service-ap-south-1.s3.amazonaws.com/latest/linux/aws-replication-installer-init.py ## this will download the agent into the instance

Enter fullscreen mode Exit fullscreen mode

sudo python3 aws-replication-installer-init.py --region ap-south-1 --aws-access-key-id “YOUR ACCESS KEY ID”—
aws-secret-access-key “YOUR ACCESS KEY” --no-prompt(this will install the agent and run it on the instance

Enter fullscreen mode Exit fullscreen mode


As the agent is successfully installed and running, it will get reflected in the Application Migration service dashboard.

Wait for the replication to happen and it will take some time, it will be appear in the image shown below and the life cycle will be in not ready state.

When the lifecycle is ready for testing clicked on "test and cutover" and “launch test instance” now the instance will be launched as per the launch template created.


Now test the application, as the instance in mumbai region got launched and the lifecycle will be in testing in progress.


As testing is completed, “mark for cutover” and lifecycle will come to ready for cutover

Clicked on launch cutover instance, (to cut the connection between with the agent) the lifecycle will be cutover in progress, clicked on Finalize cutover.

When the cutover is done then the lifecycle will be cutover complete.

The Error that i faced during the migration

  1. Be every carefully with the region sometimes i got confused.
  2. While creating template make sure the security groups, instance type, subnet and tags and properly given.

    References

    https://aws.amazon.com/blogs/publicsector/how-migrate-on-premises-workloads-aws-application-migration-service/

Top comments (0)