Skip to content
Tutorials Center
My learning

Topics

Lesson 58 of 70 ยท Architecture

Migration and Hybrid Cloud

Plan a move to AWS: the seven Rs, discovery and tracking, DMS for databases, DataSync and Snow for bulk data, and Outposts and hybrid options for what stays.

Few companies start on AWS with an empty account. Most have applications, databases and terabytes of files in an office server room or another data center, and the question is how to move them without a long outage or a rewrite nobody can afford. A migration is a portfolio exercise: dozens or hundreds of workloads, each with its own best route, run in waves.

This lesson gives you the vocabulary (the seven Rs), the services that move servers, databases and files, and the options for workloads that cannot move at all. Migration tooling needs real source systems, so every command and console step here is read-only. The two Python stand-ins let you practise the thinking: a rule-based planner that assigns a strategy to each application, and a calculator that compares a network transfer with shipping a device.

Assess before you move

A migration starts with an inventory: which servers exist, what they run, how they talk to each other and who owns them. Tools such as AWS Application Discovery Service (agents or an agentless collector) gather server specs, utilisation and network dependencies, and AWS Migration Hub offered a single place to track progress across tools. AWS adjusts which migration tools are open to new customers over time, so check the current documentation before building a plan around one of them. The principle stays the same either way: discover, group workloads that depend on each other into waves, and track each wave from assessment to cutover.

Two numbers shape the plan more than any others: how much data must move, and how much downtime each application can tolerate. They map directly onto the RPO and RTO ideas from High Availability and Disaster Recovery.

The seven Rs

Every workload gets one of seven strategies. They run from "do almost nothing" to "rebuild":

Strategy Meaning Typical example
Retire Switch it off A report server nobody has opened for a year
Retain Keep it where it is, for now A mainframe tied to a licence, or a latency-sensitive factory system
Rehost "Lift and shift": same server, now an EC2 instance A legacy app you want out of the data center fast
Relocate Move at the hypervisor level with no changes VMware workloads moved to VMware Cloud on AWS
Replatform "Lift, tinker and shift": small changes for a managed service Self-managed MySQL becomes Amazon RDS
Repurchase Replace with a different product, often SaaS A self-hosted CRM replaced by a hosted one
Refactor Re-architect to be cloud-native A monolith split into serverless functions and queues
flowchart TD
    A["Application"] --> N{"Still needed?"}
    N -- "no" --> RT["Retire"]
    N -- "yes" --> M{"Can it move now?"}
    M -- "no" --> RN["Retain"]
    M -- "yes" --> S{"SaaS replacement exists?"}
    S -- "yes" --> RP["Repurchase"]
    S -- "no" --> Q{"Worth redesigning?"}
    Q -- "yes" --> RF["Refactor"]
    Q -- "no" --> P{"Managed service is a<br/>small change?"}
    P -- "yes" --> RPL["Replatform"]
    P -- "no" --> RH["Rehost or Relocate"]

A simplified decision flow for assigning one of the seven Rs; real portfolios add cost, skills and deadlines.

Rehosting is popular because it is fast and predictable, and many teams rehost first and optimise later. The risk is that you carry old inefficiencies to a pay-as-you-go bill. Refactoring gives the biggest long-term gain but also the highest cost and risk, so reserve it for the applications where the business case is clear. Retiring is the cheapest strategy of all, and discovery often finds that a surprising share of servers qualify.

Moving servers: Application Migration Service

For rehosting, AWS Application Migration Service (MGN) installs a replication agent on each source server. The agent continuously copies the disks to a low-cost staging area in your AWS account. When you are ready, you launch test instances from the replicated data, validate them, and finally perform a cutover that launches the production instances and stops replication. Because replication is continuous, the downtime is only the time needed to cut over.

Terminal
# Read-only sketch: after the agent is installed, you work with MGN from the CLI or console
aws mgn describe-source-servers --region eu-west-1
aws mgn start-test --source-server-ids s-1234567890abcdef0 --region eu-west-1
aws mgn start-cutover --source-server-ids s-1234567890abcdef0 --region eu-west-1

Plan the target network first (a VPC with subnets and security groups), because a replicated server needs somewhere to land. Plan connectivity back to on-premises with a VPN or Direct Connect (VPC connectivity) so migrated and not-yet-migrated pieces can talk during the transition.

Moving databases: DMS

AWS Database Migration Service (DMS) copies a database while the source stays online. It has two phases you can combine: a full load that copies existing tables, and change data capture (CDC) that streams ongoing changes until you switch the application over. A replication instance (or serverless capacity) sits between the source and target endpoints.

  • Homogeneous migrations keep the engine, for example Oracle to Oracle on RDS or MySQL to Aurora MySQL.
  • Heterogeneous migrations change the engine, for example Oracle to PostgreSQL. The Schema Conversion Tool (and DMS Schema Conversion) converts tables, views and much of the procedural code, and flags what needs manual work.

DMS moves data, not application behaviour. After a heterogeneous migration you still test queries, stored procedures and performance. The target is usually RDS or Aurora, or DynamoDB for key-value workloads.

Moving files: DataSync and Transfer Family

AWS DataSync copies large file collections between on-premises storage (NFS, SMB, object stores) and S3, EFS or FSx. An agent runs near your storage, tasks run on a schedule or once, only changed data is sent, and a verification step compares source and destination. It handles encryption in transit, retries and bandwidth throttling, which is more than a hand-rolled rsync script does. AWS Transfer Family exposes S3 or EFS through SFTP, FTPS or FTP, which helps when partners already send you files that way. For one-off small copies, aws s3 sync from S3 Buckets and Objects is enough.

When the network is too slow: the Snow family

Moving 500 TB over a 1 Gbps link takes weeks even at full speed. The AWS Snow family are rugged devices you load locally and ship back to AWS, where the data is imported into S3. Snowball Edge devices hold tens to hundreds of terabytes, are encrypted and tracked, and can also run compute at the edge. Availability of individual Snow products changes, so check which ones are offered to new customers today. The break-even rule is simple: if shipping and copying time beat the network time, ship.

The second stand-in below calculates this for you.

Hybrid cloud: when some things stay

Not every workload leaves. Latency to a factory floor, data residency laws, a long licence or simply a migration that is still in progress create hybrid designs. AWS offers several bridges:

  • Site-to-Site VPN and Direct Connect link your network to a VPC.
  • AWS Outposts puts AWS-managed racks (or smaller servers) in your own data center, running EC2, EBS, ECS, EKS and some other services with the same APIs as the Region. They need a network connection back to a parent Region, and you pay for them as a service.
  • Storage Gateway gives on-premises applications a local file, volume or tape interface backed by S3.
  • AWS Systems Manager can manage on-premises servers alongside EC2 instances, which simplifies patching and access during the transition (Systems Manager).

Keep identity consistent, too: use IAM Identity Center with your existing directory so people sign in once.

Archives, Snow devices and gateways in detail

Three topics from the sections above deserve a closer look, because they appear in migrations and in exams.

S3 Glacier vaults (the original Glacier service)

Before S3 had archive storage classes, AWS offered S3 Glacier as a separate service built around vaults and archives. An archive is one object (a file or a zip) that you upload to a vault and that gets an archive ID. You cannot browse it like S3: you list the vault inventory (refreshed about once a day), then start a retrieval job and wait. Retrieval speed is a choice:

Retrieval option Typical time Cost Use it for
Expedited 1 to 5 minutes Highest An urgent request for a small archive
Standard 3 to 5 hours Medium Normal restores
Bulk 5 to 12 hours Lowest Large restores that can wait

Two vault features matter for compliance:

  • A vault access policy (like a bucket policy) controls who may use the vault.
  • A Vault Lock policy, such as "archives cannot be deleted for 7 years", is made immutable once you complete the lock. You first call initiate-vault-lock (the policy is in a testing state for up to 24 hours, and you can still abort), then complete-vault-lock with the lock ID. After that nobody, including the root user, can change the policy. This is the WORM (write once, read many) model for regulated records.
Terminal
aws glacier create-vault --account-id - --vault-name records-2026
aws glacier initiate-vault-lock --account-id - --vault-name records-2026 \
  --policy file://vault-lock-policy.json
# test for up to 24 hours, then:
aws glacier complete-vault-lock --account-id - --vault-name records-2026 --lock-id <LockId>

For new projects AWS generally recommends the S3 Glacier storage classes with S3 Object Lock instead (see S3 Storage Classes and Lifecycle), because you keep the S3 API, bucket features and lifecycle rules. Vaults remain in many older systems and in the exam syllabus.

The Snow family in more detail

The family has several devices, from small to large:

  • Snowcone: a small, rugged device (a few kilograms) with a few terabytes of storage, for edge sites and small transfers, which can also be shipped back or, with an agent, send data online.
  • Snowball Edge Storage Optimized: tens to hundreds of terabytes of storage for data transfer and local processing, with block and object interfaces.
  • Snowball Edge Compute Optimized: more CPU and optional GPU for edge machine learning and processing in places with no connectivity.
  • Very large transfers (petabytes and exabytes) used to be handled by a truck-sized device. Today the guidance is several Snowball Edge devices in parallel, or Direct Connect.

The workflow is the same for all: create a job in the console, AWS ships the device, you connect it to your network and copy data with the Snowball client or S3-compatible interface, ship it back, and AWS imports the data into your S3 bucket and wipes the device. Data on the device is encrypted with keys from KMS. As noted above, availability of each device changes, so check the current list before you plan a migration around one.

Storage Gateway: three kinds

AWS Storage Gateway runs as a virtual machine or hardware appliance on premises and gives local applications a familiar interface, while the data lives in AWS.

Gateway Local interface Backed by Typical use
S3 File Gateway NFS and SMB file shares S3 objects (one file per object) Back up or tier file shares to S3, keep recent files cached locally
FSx File Gateway SMB shares FSx for Windows File Server Low-latency local access to a cloud Windows file system
Volume Gateway iSCSI block volumes S3, with EBS snapshots. Cached mode keeps the hot data locally, stored mode keeps everything locally and backs up asynchronously Disaster recovery and cloud backup of block storage
Tape Gateway Virtual tape library (iSCSI VTL) S3 and S3 Glacier storage classes Replace physical tape backup software and tapes
Python Which gateway or transfer service?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Retrieval times affect plans too. The planner below picks the cheapest Glacier retrieval option that meets a deadline, using the typical times from the table and invented relative prices.

Python Pick a Glacier retrieval option for a deadline

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Stand-in 1: a migration planner

The planner below applies the decision flow to a small portfolio. Each application has a few facts, and the rules choose one of the Rs. It is a deliberately simple rule set that mirrors the flowchart, not a replacement for a real assessment.

Python Assign a migration strategy to each application

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Change a fact, such as setting "saas": True for the wiki, and run again to see the strategy change. Real planning adds dependencies (the CRM may feed the orders app), deadlines such as a data center lease ending, and the skills of the team.

Stand-in 2: transfer time, network versus a shipped device

The calculator estimates how long a bulk transfer takes over a network link with a realistic efficiency factor, and compares it with a device round trip: shipping out, copying locally, shipping back and importing. All the device figures are assumptions you can change; they are not AWS commitments.

Python Network transfer or ship a device?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Two lessons hide in the table. Small datasets almost always belong on the network, because shipping has a fixed floor of several days. Large datasets over slow links favour devices by a wide margin, but a fast, dedicated Direct Connect link can win again. DataSync can also run alongside: seed the bulk with a device, then use the network to catch up on changes.

Practical advice

  • Migrate in waves, easiest and least risky first, so the team learns on workloads that matter less.
  • Build a landing zone (accounts, networking, logging, guardrails) before the first wave. Multi-Account Strategy and Control Tower explains it.
  • Rehearse the cutover with test instances and keep a rollback plan for the first days.
  • Tag migrated resources so cost reports show what each wave costs, and right-size after a few weeks of real utilisation.
  • Keep data transfer in mind. Data into AWS is generally free, but data out and cross-Region traffic are billed.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A team moves a self-managed MySQL server to Amazon RDS for MySQL without changing the application. Which of the seven Rs is that?

    Replatform means small changes to benefit from a managed service. Rehost would keep MySQL on an EC2 instance that you operate yourself.
  2. 2. Which service copies a database while it stays online, using a full load followed by change data capture?

    DMS performs the initial copy and then streams ongoing changes until you switch the application to the target.
  3. 3. You must move 400 TB over a slow 200 Mbps link and the data center closes in two months. What is the sensible plan?

    At that bandwidth the network needs many months, so shipping devices for the bulk and catching up with deltas fits the deadline.
  4. 4. What does AWS Outposts provide?

    Outposts brings AWS infrastructure and services on premises, managed by AWS and connected back to a parent Region.

Summary

  • Discover and group workloads into waves before moving anything; downtime tolerance and data volume shape each route.
  • The seven Rs are Retire, Retain, Rehost, Relocate, Replatform, Repurchase and Refactor; many workloads need the cheapest one that meets the goal.
  • MGN replicates servers for rehosting, DMS moves databases with full load plus CDC, DataSync and Transfer Family move files.
  • Snow devices beat the network when data is large and links are slow; compute the break-even.
  • Hybrid options such as VPN, Direct Connect, Outposts and Storage Gateway cover workloads that stay behind.

Next: Project: Static Site on S3 and CloudFront.