Cross-Cloud VM Migration: GCP → AWS Using AWS Application Migration Service (MGN)

Search for a command to run...

One thing that stood out in this article is how it explains the practical challenges of moving workloads from GCP to AWS instead of focusing only on the migration steps. The discussion around replication, access models, and cutover planning is especially useful for organizations planning enterprise AWS cloud migration initiatives. It would also be worthwhile to mention how AWS DMS database migration can complement server migration when databases need near-zero downtime synchronization. Readers looking for a broader perspective on AWS cloud migration services may also find this resource helpful: https://mobisoftinfotech.com/resources/blog/enterprise-aws-cloud-migration-guide. It's a well-structured guide that covers migration planning, best practices, and common pitfalls.
Real production migration and incident playbooks focused on safe execution, root cause analysis, and rollback-first DevOps practices. Each post documents how real production issues were handled and fixed without downtime.
This migration was performed on a production workload where cost reduction was prioritized over zone-level high availability.
This migration was performed on a production workload where cost reduction was prioritized over zone-level high availability.

1. Overview What I Designed I designed a hybrid infrastructure architecture: Terraform → Foundation Layer Crossplane → Dynamic Lifecycle Layer ArgoCD → GitOps Enforcement This created a continuou

When AWS introduced AWS DevOps Agent, I was less interested in feature lists and more interested in one practical question. Can it actually reduce investigation time during real production-style failu

Migrating object storage across cloud providers is not a copy task.It is a cost, network, and security boundary problem. We migrated 10+ TB of object data from Google Cloud Storage to Amazon S3 under

Cross-cloud VM migration is not a disk copy task.
It is:
An access model transformation
A replication lifecycle management exercise
A downtime control operation
A cost boundary decision
We executed a production-grade migration from Google Compute Engine to Amazon EC2 using AWS Application Migration Service (MGN) under strict operational constraints:
Target RPO ≈ 0 at cutover (achieved through application write freeze, replication validation, and successful final synchronization)
Downtime < 30 minutes
No SSH/RDP lockout
Controlled replication cost
Preserved rollback capability
This article documents a technically precise, enterprise-review-safe execution model.
We evaluated:
Manual snapshot export/import
Image-based migration
Backup/restore workflows
Application rebuild
We selected AWS MGN because:
Continuous block-level replication minimizes downtime
Test migrations do not impact production
Cutover is controlled and repeatable
No application redesign required (pure rehost model)
This was lift-and-shift, not modernization.
AWS MGN is an agent-based block-level replication service.
It:
Installs a replication agent on the source VM
Reads disk blocks at the operating system level
Continuously replicates encrypted data to AWS
Uses staging replication servers and EBS volumes
Launches test and cutover EC2 instances
MGN replicates disk state.
It migrates:
Local OS users stored on disk
SSH configuration files stored on disk
Application binaries
System configuration
It does not migrate:
GCP OS Login (IAM-based access)
Metadata-injected SSH keys
DNS records
Load balancers
Managed services (Cloud SQL, etc.)
IAM identities
Any identity mechanism tied to GCP metadata or IAM must be replaced with persistent OS-level users or SSM-based access prior to cutover.
GCP VM
↓
MGN Replication Agent
↓
Encrypted TLS Transfer
↓
AWS Staging Replication Server
↓
EBS Replication Volumes
↓
Launch Template
↓
Test EC2 Instance
↓
Cutover EC2 Instance
Replication continues until cutover.
Data encrypted in transit (TLS)
EBS encryption configurable at rest
Replication throughput depends on bandwidth, write churn, and staging configuration
Initial full replication in progress.
Initial synchronization complete. Continuous delta replication active.
Test EC2 launched. Source VM continues running.
Replication functioning correctly with minimal lag.
Proceed only if:
Migration lifecycle = Ready for cutover
Replication status = Healthy
Replication lag is negligible or zero
Never execute cutover if replication is not Healthy.
Final synchronization executing and EC2 launching.
AWS EC2 becomes the active production workload.
Default GCP access model:
OS Login (IAM-based)
Metadata-injected SSH
Console SSH
Default AWS access model:
OS-level local users
SSH key pairs
SSM Session Manager
These models are incompatible.
If a VM relies exclusively on GCP OS Login or metadata-based SSH, administrative access will be lost after migration.
Create a persistent administrative user:
sudo useradd awsadmin
sudo mkdir -p /home/awsadmin/.ssh
sudo chmod 700 /home/awsadmin/.ssh
sudo nano /home/awsadmin/.ssh/authorized_keys
sudo chmod 600 /home/awsadmin/.ssh/authorized_keys
sudo chown -R awsadmin:awsadmin /home/awsadmin
sudo usermod -aG sudo awsadmin
Validate SSH access before migration.
Attach IAM role:
AmazonSSMManagedInstanceCore
This ensures emergency fallback access via Session Manager.
Enable local Administrator
Enable RDP
Allow TCP 3389
Validate login before migration
Port | Protocol | Purpose |
|---|---|---|
443 | TCP | AWS control plane communication |
1500 | TCP | Replication data channel |
53 | TCP/UDP | DNS (system prerequisite) |
123 | UDP | NTP (system prerequisite) |
No inbound firewall rules are required on the source VM for MGN.
If staging and target instances reside in private subnets, outbound connectivity must be provided via:
NAT Gateway
VPC Endpoints
Direct Connect
VPN
NAT is required only if no internet access or VPC endpoints are configured.
AWS MGN provides crash-consistent replication.
To achieve near-zero RPO:
Freeze application writes
Confirm replication status = Healthy
Confirm replication lag ≈ 0
Execute cutover
For database workloads, application quiescing is mandatory.
MGN does not provide automatic application-consistent snapshots.
Initial synchronization depends on:
Disk size
Network bandwidth
IOPS
Write churn
Example (environment dependent):
50 GB → 20–40 minutes
200 GB → 1–2 hours
1 TB → Dependent on available bandwidth
Downtime is not determined by disk size.
Downtime = write freeze duration + final synchronization time.
Validated production sequence:
Freeze application writes
Confirm replication status = Healthy
Confirm lag negligible
Launch cutover instance
Stop GCP VM
Update DNS or routing
Observed downtime: 5–30 minutes.
If validation fails:
Do not delete source VM
Restore DNS to GCP
Maintain replication configuration
Reattempt cutover
Never decommission the source environment until fully validated.
Staging replication servers
EBS volumes
Snapshots
NAT (if used)
Data transfer
Large parallel migrations may:
Increase staging cost
Increase EBS consumption
Saturate bandwidth
Trigger API throttling
Recommendation: Execute migrations in controlled waves.
Suitable for:
Lift-and-shift
Data center exit
Legacy workload relocation
Time-constrained transitions
Not suitable for:
Cloud-native redesign
Container migrations
Managed database modernization
Application refactoring
AWS Application Migration Service is predictable when:
Access models are reconciled
OS compatibility is validated
Replication health and lag are monitored
Cutover is controlled
Rollback capability is preserved
Most migration failures are not replication failures.
They are planning failures.
Cross-cloud VM migration is an operational engineering discipline — not a file transfer task.