How to setup AWS Application Migration Service

Steve Pe
5 min readJun 20, 2022

--

AWS Application Migration service is easiest and quickest way to migrate your virtual, physical or cloud-base servers to AWS, minimal business disruption.

Here is how to setup and migrate your Linux server(s). This setup no ‘Web Proxy’ nor VPN.

Prerequisite

- At least IAM role with “AWSApplicationMigrationFullAccess” Attached. Also both aws console and cli access. s

- TCP port 443 open from source server/environment to AWS Region

- Source server will use TCP port 1500 for data transfer to replication servers in Staging area subnet.

- SSH sudo permission on source server.

Here is Network Architecture diagram

§ Log in to AWS Console and navigate to Application Migration Service console: https://console.aws.amazon.com/mgn/home?region=us-east-1

o Create Replication Setting template (This is for your replication server)

o Enter Subnet you want to use your replication server, especially if you have custom VPC for your migration. The rest can be default

o Click Create template

§ Download and install AWS Replication Agent from us-east1 region

wget -O ./aws-replication-installer-init.py https://aws-application-migration-service-us-east-1.s3.us-east-1.amazonaws.com/latest/linux/aws-replication-installer-init.py

sudo python3 aws-replication-installer-init.py

o Enter AWS Region you want to migrate

o Enter your aws access key id

o Enter your aws secret access key

o Select disk(s) you want to migrate

§ After successfully run above commands this instance will register at Application Migration Service console Source servers area. (From above step Replication Setting template). Wait until Data replication status: ‘Healthy’ and next step area: ‘Launch test instance’.

§ Ready for next step

§ Update Launch settings: Click source server name and select Launch settings

§ Click Modify at EC2 Launch Template after modify instance type, subnet, keypair, security group save as new name and make sure set to default version.

o Give very unique name and select source template version

o Select Instance type you want for your test lunch instance and keypair to login.

o Select Subnet, security group(s) for your test instance to host. Then click Advanced network configuration enable Auto-assign public IP. (hint: this is on custom VPC)

o Check carefully and click Create template version

o Click View launch templates then select template id and click Actions for Set default version.

o Choose newly created version and click Set ass default version

§ After that go back to ‘Application Migration Service’ console source servers area and see EC2 Launch Template info changed or not. If not miss some steps on template new version creation steps.

§ Then lunch test instances

§ At EC2 console (region you want to migrate) will show up two instances one for Replication server and another Conversion server. (hint: no test instance is provision yet!)

§ A few minutes late your test instance will be appear with launch template you modified.

§ Check Migration dashboard for status also ec2 dashboard (hint: this will take a few minutes, if test instance is small will take longer or still with c4 large)

§ After test instance is ready log in and test all necessary thing and compare with source instance (hint: Conversion server is already terminated by itself)

§ Any issue Revert to “ready for testing” at Action dropdown. Make sure terminate launch instance from Action dropdown. Then re-launch test instance.

§ Ready for cutover

§ Before launching cutover instance need to update/modify EC2 Launch Template (hint: going to use c4.large and resize later) then create new version and set default. After that verify at EC2 Launch Template area.

§ Mark as “Ready for cutover”

§ After marked ass ready for cutover test instance is starting to terminate.

§ Launch Cutover instance

§ At Migration dashboard

§ At EC2 console Conversion Server will provision c4.large instance and terminate test instance.

§ Verify all necessary on cutover instance then if require re size. If re size after boot up test/verify again.

§ Any issue Revert to “Ready for cutover” at Action dropdown. Make sure terminate launch instance from Action dropdown. Then re-launch cutover instance.

§ After everything is verify Mark as ‘Finalize cutover”

§ At migration dashboard showed Cutover complete and Data replication disconnected

§ Any issue Revert to “Ready for cutover” at Action dropdown. Make sure terminate launch instance from Action dropdown. Then re-launch new instance.

§ Then Mark as archived disconnect from source. It will terminate Replication Server.

Congratulation!

--

--

Steve Pe
Steve Pe

Written by Steve Pe

Infrastructure Architect — Cloud Platforms (Kyndryl)

No responses yet