Study guide
Technical reference and lesson notes
Purpose of This Lesson
AWS Application Migration Service (MGN) is AWS’s highly automated rehosting, or lift-and-shift, service for moving applications that run on physical or virtual servers into AWS. It is designed to replicate source servers, create Amazon EC2 launch templates, and support controlled migration waves with short cutover windows.
MGN is the preferred AWS service for server migration scenarios that previously might have been addressed with AWS Server Migration Service (SMS).
Key Concepts
Server Rehosting with AWS MGN
MGN migrates server-based workloads to Amazon EC2 with minimal application modification. It can migrate:
- VMware virtual machines
- Hyper-V virtual machines
- Physical servers
The destination workload is launched as EC2 instances using launch templates generated and managed as part of the migration process.
Agent-Based and Agentless Replication
MGN supports different replication approaches depending on the source environment:
- Agent-based replication: An agent runs on the source server and continuously replicates changed disk blocks to AWS. AWS recommends this approach when possible because it supports continuous data protection and enables shorter cutover windows.
- Agentless replication: For supported VMware and Hyper-V environments, snapshot-based replication can be used through the appropriate virtualization management integration, such as an installed VMware vCenter client. This approach may be useful when installing an agent on source servers is not practical.
The key distinction is that agent-based replication provides continuous block-level replication, while agentless approaches rely on incremental snapshots.
Continuous Block-Level Replication
MGN continuously replicates changed blocks from the source server to AWS. This allows the destination environment to remain nearly synchronized with the source while the application continues running on premises.
During final cutover, only the remaining changes need to be applied before launching the EC2 instances. As a result, cutover windows can often be measured in minutes rather than hours.
Launch Templates
MGN creates launch templates for migrated servers. These templates define how the destination EC2 instances are launched and can be adjusted as part of migration planning.
After final cutover, the migrated application servers are launched in AWS from these templates. The migration workflow therefore separates replication from the final compute launch:
- Replicate the source server to AWS.
- Configure the destination launch settings.
- Test or stage the migration as needed.
- Perform final cutover.
- Launch the EC2 instances from the migration-generated launch templates.
Application Groups and Migration Waves
Applications commonly have dependencies among web servers, application servers, databases, and supporting services. Migrating each server independently can cause compatibility or availability problems if dependent components are separated.
MGN allows related servers to be organized into application groups. These groups can then be migrated together in a migration wave, helping preserve application dependencies during cutover.
Automation and Integration
MGN can integrate with other AWS services to automate migration workflows. For example:
- Amazon EventBridge can detect migration-related events.
- AWS Lambda can respond to those events and perform automated actions.
- AWS CloudFormation can be used to develop infrastructure templates for deploying the migrated environment.
- Cloud Migration Factory can help orchestrate manual and automated migration processes at scale.
MGN provides the server replication and migration capability, while these integrations can coordinate surrounding operational tasks.
MGN Compared with AWS Server Migration Service
AWS Server Migration Service (SMS) is the older server migration service. The main exam-relevant distinction is the replication model and expected cutover duration:
| Capability | AWS Application Migration Service (MGN) | AWS Server Migration Service (SMS) |
|---|---|---|
| Primary approach | Highly automated rehosting | Server migration using incremental snapshots |
| Replication | Continuous block-level replication when using agents | Incremental snapshot-based replication |
| Typical cutover window | Minutes | Hours |
| AWS recommendation for new server migrations | Preferred option | Older service; generally use MGN instead |
| Destination | Amazon EC2 | Amazon EC2 |
Exam-Relevant Takeaways
- Choose AWS Application Migration Service (MGN) for automated lift-and-shift migration of physical or virtual servers to EC2.
- MGN supports VMware, Hyper-V, and physical servers.
- Agent-based replication is generally preferred because it provides continuous data protection through continuous block-level replication.
- Agentless replication is associated with snapshot-based replication in supported VMware and Hyper-V environments.
- MGN creates EC2 launch templates used to launch migrated instances after cutover.
- Use application groups and migration waves when servers have dependencies and should move together.
- EventBridge and Lambda can automate actions in response to migration events.
- CloudFormation can be used to deploy infrastructure around the migrated application.
- MGN is preferred over the older AWS Server Migration Service (SMS).
- MGN is a rehosting service. It does not inherently modernize the application or convert it into containers, serverless functions, or managed databases.
Architecture Decision Guide
| Requirement | Recommended approach | Reason |
|---|---|---|
| Migrate physical servers to AWS | AWS MGN with agent-based replication | MGN supports physical server migration and continuous replication |
| Migrate supported VMware or Hyper-V workloads without installing agents | MGN agentless replication | Snapshot-based replication may be appropriate when source agents cannot be installed |
| Minimize final application downtime | MGN agent-based replication | Continuous block-level replication reduces the amount of data remaining at cutover |
| Migrate several interdependent servers together | Organize servers into an application group and migration wave | Keeps related workloads coordinated during migration |
| Automatically respond to migration events | EventBridge integrated with Lambda | Enables event-driven workflow automation |
| Deploy surrounding AWS resources consistently | CloudFormation | Infrastructure can be represented as repeatable templates |
| Orchestrate migration activities across many applications | Cloud Migration Factory with MGN | Supports coordination of automated and manual migration tasks |
| Perform a new server migration rather than using the older SMS workflow | AWS MGN | AWS recommends MGN instead of SMS |
Common Exam Traps
- Choosing SMS because the question describes server migration: SMS is the older service. For current AWS server migration scenarios, MGN is generally the expected answer.
- Confusing MGN with a database migration service: MGN migrates servers and their block-level data to EC2. Database-specific migrations may require a database migration service or another database modernization strategy.
- Assuming all MGN replication is agentless: MGN can use agent-based replication, which is AWS’s recommended approach when possible.
- Selecting snapshot replication for the shortest cutover: Continuous block-level replication generally provides a shorter cutover window than incremental snapshot-based replication.
- Treating MGN as modernization: MGN primarily rehosts servers. It does not automatically redesign the workload as containers, serverless components, or managed AWS services.
- Ignoring application dependencies: Migrating dependent servers separately can break application workflows. Use application groups and migration waves when coordinated migration is required.
- Assuming MGN directly deploys every surrounding resource: MGN focuses on server replication and EC2 launch configuration. Use CloudFormation and other integrations to deploy or automate related infrastructure.
Real-World Engineer Notes
- Classify applications and their dependencies before scheduling migration waves. A technically successful server replication can still result in an application outage if the correct startup and cutover order is not understood.
- Use agent-based replication when the priority is minimizing downtime and maintaining a closely synchronized recovery point.
- Agentless replication can be useful when source-server changes are restricted, but its snapshot-based model should be considered when estimating recovery point and cutover timing.
- Treat the MGN-generated launch templates as an important part of the destination design. Verify instance sizing, networking, security controls, storage configuration, and other launch settings before production cutover.
- Use EventBridge and Lambda for repeatable workflow steps, but keep operational safeguards around actions that could affect production systems.
- Cloud Migration Factory is useful when a migration involves many servers and includes substantial coordination outside the replication process itself.
Quick Reference Summary
- Service: AWS Application Migration Service (MGN)
- Primary use: Automated rehosting of physical and virtual servers to AWS
- Destination: Amazon EC2
- Replication options: Agent-based continuous block-level replication or supported agentless snapshot-based replication
- Preferred option: Agent-based replication when possible
- Cutover: Typically shorter with continuous replication; often measured in minutes
- Organization: Application groups and migration waves
- Launch mechanism: MGN-created EC2 launch templates
- Automation integrations: EventBridge, Lambda, CloudFormation, and Cloud Migration Factory
- Legacy comparison: MGN is preferred over AWS Server Migration Service (SMS)
Flashcards
- Q: What is the primary purpose of AWS Application Migration Service (MGN)?
A: To automate the rehosting of physical and virtual servers into AWS, where they run as EC2 instances.
- Q: Which source server types can MGN migrate?
A: Physical servers and supported VMware and Hyper-V virtual machines.
- Q: What replication method does AWS generally recommend for MGN?
A: Agent-based replication when possible.
- Q: Why is agent-based replication useful for minimizing downtime?
A: It continuously replicates changed disk blocks, reducing the amount of data that must be synchronized during final cutover.
- Q: What is the main characteristic of agentless MGN replication?
A: It uses snapshot-based replication in supported virtualization environments rather than installing an agent on each source server.
- Q: What does MGN create for launching migrated servers?
A: Amazon EC2 launch templates.
- Q: What is an MGN migration wave?
A: A coordinated migration of a group of related servers, often organized around application dependencies.
- Q: Why should dependent application servers be placed in the same application group?
A: To help migrate and cut over components that rely on one another as a coordinated unit.
- Q: Which service can trigger Lambda functions in response to MGN events?
A: Amazon EventBridge.
- Q: How can CloudFormation complement MGN?
A: It can define and deploy infrastructure required by the migrated application using repeatable templates.
- Q: What older AWS service does MGN generally replace for server migration?
A: AWS Server Migration Service (SMS).
- Q: What is the typical difference between MGN and SMS cutover windows?
A: MGN can support cutovers measured in minutes with continuous replication, while SMS’s snapshot-based approach may require hours.
Practice Questions
Question 1
A company is migrating 200 physical and virtual servers from its data center to Amazon EC2. The company wants continuous replication and a final cutover window measured in minutes. Which AWS service should the solutions architect recommend?
A. AWS Server Migration Service (SMS)
B. AWS Application Migration Service (MGN)
C. AWS Database Migration Service (DMS)
D. AWS DataSync
Correct answer: B. AWS Application Migration Service (MGN)
Explanation: MGN is designed for automated rehosting of physical and virtual servers to EC2. Its agent-based, continuous block-level replication supports short cutover windows. SMS is the older snapshot-based server migration service, DMS focuses on databases, and DataSync is designed for data transfer rather than full server rehosting.
Question 2
A VMware environment contains an application server and a database server that must be migrated and cut over together. Which MGN capability should be used?
A. Place both servers in the same application group and migration wave
B. Convert both servers to Lambda functions
C. Use separate migration waves to reduce replication traffic
D. Export both servers as CloudFormation templates
Correct answer: A. Place both servers in the same application group and migration wave
Explanation: Application groups and migration waves help coordinate the migration of servers with dependencies. CloudFormation can deploy infrastructure but does not replace MGN’s application grouping capability, and MGN is not a server-to-Lambda conversion service.
Question 3
A company cannot install agents on its supported Hyper-V virtual machines. It still wants to use MGN to migrate the servers. Which replication approach is most appropriate?
A. Agentless snapshot-based replication
B. Continuous block-level replication from an installed source agent
C. Database replication through AWS DMS
D. Manual AMI creation only
Correct answer: A. Agentless snapshot-based replication
Explanation: MGN supports agentless replication for supported virtualization environments such as VMware and Hyper-V. This approach uses snapshots and avoids installing an agent on each source server. The tradeoff is that it does not provide the same continuous replication model as agent-based replication.
Question 4
An organization wants to invoke an AWS Lambda function whenever a migration workflow event occurs, such as to automate a follow-up operational task. Which integration should be used?
A. Amazon EventBridge connected to Lambda
B. Amazon Route 53 connected to Lambda
C. Amazon CloudFront connected to Lambda@Edge
D. AWS Direct Connect connected to Lambda
Correct answer: A. Amazon EventBridge connected to Lambda
Explanation: EventBridge can receive migration-related events and invoke Lambda for event-driven automation. The other services do not provide the described general migration-event workflow integration.
Question 5
A solutions architect is selecting between AWS SMS and MGN for a new server migration project. The project requires automated incremental migration and the shortest practical cutover window. Which choice is best?
A. AWS SMS because it uses incremental snapshots
B. AWS MGN because it supports continuous block-level replication
C. AWS DMS because it provides continuous server replication
D. AWS Storage Gateway because it creates EC2 launch templates
Correct answer: B. AWS MGN because it supports continuous block-level replication
Explanation: MGN is the preferred service for current server migration projects and supports continuous block-level replication with agent-based replication. SMS uses incremental snapshot-based replication and generally has longer cutover windows. DMS is database-focused, while Storage Gateway does not provide MGN’s server migration workflow.