AWS Certified Solutions Architect – Professional
AWS Application Migration Service (MGN) explained for SAP-C03
AWS documents AWS Transform MGN, formerly AWS Application Migration Service, as its rehosting service. An agent on each source server replicates the disks block by block to a staging area subnet, and MGN converts the server to launch on Amazon EC2. You launch test instances, then cutover instances, then finalize the cutover, which stops replication.
How does MGN replicate a server?
MGN migrates physical, virtual and cloud servers that run Windows Server or a range of Linux distributions. It replicates each source server continuously at block level and converts it to launch on AWS, so cutover windows are typically minutes. The source environment is not modified.
The AWS Replication Agent on each source server sends data to replication servers in a staging area subnet in your account. You name that subnet in the replication settings template. AWS recommends a new, dedicated subnet for it.
Three templates control the work: replication, launch and post-launch. Template settings are applied to each newly added server, and you can override them per server. For large estates you group servers into applications and applications into waves, and act on a whole wave at once.
Which network paths does MGN need?
Each source server must reach the MGN API endpoint over TCP 443. That path downloads and upgrades the agent and reports the server and its replication status to the console.
Replicated data takes a different path: from the agent on the source server to the replication servers in the staging area subnet over TCP 1500. The data is compressed and encrypted on the source side before transfer.
The staging area subnet has its own needs. The replication servers must reach MGN over TCP 443, and the subnet also needs the Amazon EC2 endpoint of its Region and Amazon S3. For internet connectivity AWS lists two options: a public IP address with an internet gateway, or a private IP address with a NAT gateway. If you use an Amazon S3 VPC endpoint, its policy must allow the MGN buckets.
Test launch, cutover launch and finalize
Test and cutover instances launch into the subnet named in the Amazon EC2 launch template that MGN creates for each source server. AWS's best practice is to test at least two weeks before the planned cutover.
A cutover launch first deletes any earlier test instance, then launches a new instance from the most up-to-date state of the source server. Replication does not stop there. New changes on the source keep flowing to the staging area, not to the cutover instance.
Finalizing the cutover ends the migration for that server. Its lifecycle changes to Cutover complete, replication stops, the replicated data is discarded and the replication resources are terminated. You can then archive the server.
Post-launch actions
Post-launch settings must be activated at the account level. Once active, MGN installs the SSM Agent on launched servers and runs the configured actions. Predefined actions come with the service. A custom action runs any AWS Systems Manager document available in the account.
A custom action has an option that it must complete successfully before the cutover can be finalized. A separate setting chooses whether actions run on test instances, cutover instances or both.
The post-launch template applies to every newly added server. Changing the template does not affect servers that are already in the MGN console. Those servers are changed one by one in their own post-launch settings.
MGN vs VM Import/Export
VM Import/Export imports VM image files from a virtualization environment into Amazon EC2 as Amazon Machine Images (AMIs). You upload the image to an S3 bucket in the target Region and run the import. One AMI can launch many instances, which fits a catalog of approved images.
It has a limit that MGN does not. VM Import/Export supports only images whose operating system was natively installed inside the source VM, not images created by a physical-to-virtual (P2V) conversion.
Where the exam catches people
- Believing replicated data travels over TCP 443: 443 carries control traffic to the MGN endpoint. The data goes from the source server to the staging area subnet over TCP 1500.
- Believing a private staging area subnet needs no outbound path: its replication servers must reach MGN, Amazon EC2 and Amazon S3.
- Believing an edit to the post-launch template updates servers already added: it applies to newly added servers only. Existing servers are edited individually.
- Believing replication ends when the cutover instance launches: it continues until you finalize the cutover.
- Believing VM Import/Export takes any exported VM: it does not support images created by P2V conversion.