Introduction
The server migration that took six months instead of six weeks didn't fail because of AWS. It failed because the team discovered, after migrating the application server, that it had an undocumented dependency on a local SMTP relay running on the same host, a cron job that called a database on the same LAN, and a license server that was bound to the server's MAC address. None of these appeared in the architecture documentation. All of them broke within forty-eight hours of the migration.
Server migration to AWS is primarily a dependency management problem. The technical work of moving a server (creating an AMI, spinning up an EC2 instance, testing the application, cutting over DNS), is straightforward. The hard work is understanding what else breaks when that server moves: which other servers depend on it, which services it depends on, which network paths it relies on that won't exist in AWS, and which assumptions about latency, DNS resolution, or subnet topology are baked into its configuration.
This post covers application dependency mapping, the work that must happen before any server moves, and how to structure a migration so that dependencies are migrated in the right order.
Why Migrations Fail on Dependencies, Not Servers
A server is easier to migrate than its relationships. You can snapshot a server, replicate it to AWS, validate the application, and cut over traffic in a weekend. What you can't do is snapshot the implicit dependency graph that the server participates in: the other servers that call it, the shared file systems it reads, the network services it expects to find at a specific IP, the monitoring agents that assume it's on a specific subnet.
The dependency discovery gap is the core problem. Most organizations have network diagrams and architecture documentation that was accurate when it was written and hasn't been updated since. The production environment has evolved through years of operational iteration, new services added, ad-hoc integrations built, firewall rules opened for specific use cases that nobody documented. The dependency map that exists in documentation is a historical artifact. The dependency map that exists in production traffic is the one that determines whether the migration succeeds.
The specific failure modes that surface during migrations that skip dependency mapping:
Hard dependencies discovered post-migration. The migrated application fails immediately because a service it calls is still on-premises and the network path no longer exists. The team has to either revert the migration, build a VPN or Direct Connect to bridge the gap, or migrate the dependency before continuing.
Soft dependencies discovered during testing. The migrated application starts but behaves incorrectly, slower than expected, returning incorrect data, failing intermittently. Investigation reveals it's calling a service that's partially reachable (high latency through a VPN, or reachable but returning different data than the application expects). These are harder to debug than hard failures because the application appears to be working.
Latency-sensitive dependencies that break under increased RTT. An application that runs on the same LAN as its database has sub-millisecond database latency. Migrated to AWS while the database remains on-premises, the same application now has 15-30ms latency to its database. The application might work, but response times degrade enough to affect users: not enough for an obvious failure, enough for complaints.
Undiscovered shared resources. Two applications sharing a file system, a scheduled job, or a local cache that neither team knew the other was using. Migrating one breaks the other's assumption that the resource is local.
The concrete example: a manufacturing company migrating an ERP application server discovered during post-migration testing that a report generation module wrote temporary files to a path that was actually a mount point for a shared NAS volume. The NAS was still on-premises. The migration had worked perfectly for everything except the reports, which silently wrote to a local path and then failed to retrieve the files, because the report files were now on the EC2 instance, not on the NAS that the retrieval process expected. Dependency mapping would have caught this. The three-day debugging session that followed was avoidable.
AWS Deep Dive: Mapping Dependencies Before You Migrate
AWS Application Discovery Service
AWS Application Discovery Service (ADS) is the native tool for automated dependency discovery before a migration. It operates in two modes: agentless discovery, which uses VMware vCenter to collect VM inventory and basic configuration data, and agent-based discovery, which installs a lightweight agent on each server to collect OS-level data including process information, network connections, and performance metrics.
The agent-based discovery is what actually produces a dependency map. The agent captures TCP connection data (source IP, destination IP, port, connection frequency), from every server where it's installed. AWS Migration Hub aggregates this data and renders a visualization of network connections between servers, which becomes the starting point for identifying application groups and migration waves.
The output is not a complete dependency map out of the box. It shows network connections, not application-level dependencies. A TCP connection from server A to server B on port 5432 tells you A is connecting to B on a PostgreSQL port. It doesn't tell you whether that connection is a critical synchronous dependency, an async reporting query that runs weekly, or a monitoring agent checking database health. The network connection data requires human interpretation to produce a migration-relevant dependency map.
The non-obvious limitation of ADS: the agent captures connections that are active during the collection window. Dependencies that are used infrequently (monthly batch jobs, quarterly report generation, annual backup processes), may not appear in a two-week collection window. Supplement agent data with application team interviews and cron job audits to surface periodic dependencies that won't appear in network traffic analysis.
Running ADS discovery and exporting the network connection data:
# Start a continuous export of agent-collected data to S3
aws discovery start-continuous-export
# After sufficient collection time, describe the export
aws discovery describe-continuous-exports
# List discovered servers with their connection data
aws discovery describe-agents \
--filters "Name=health-status,Values=RUNNING" \
--query 'agentsInfo[*].{AgentId:agentId,Hostname:hostName,IP:ipAddresses}'
Migration Hub and Wave Planning
AWS Migration Hub provides the coordination layer for a migration: it tracks migration status across multiple tools (Application Migration Service, Database Migration Service, third-party tools), gives you a central view of what's been migrated, what's in progress, and what hasn't started, and integrates with ADS to connect discovery data to migration tasks.
The wave planning pattern is how dependency maps become migration schedules. A wave is a group of servers that can be migrated together because they don't have inter-dependencies that would cause one to fail if another hasn't been migrated yet. The dependency map determines which servers must be in the same wave, which can be in different waves, and what order waves must execute in.
A practical wave structure for a mid-size on-premises environment:
Wave 0: Shared Infrastructure
├── DNS servers (or configure Route 53 resolver rules first)
├── Active Directory / LDAP (or use AWS Directory Service)
└── NTP / time services
Wave 1: Data Tier
├── Databases (migrate before any application that depends on them)
├── Shared file systems (migrate before applications that mount them)
└── Message queues and cache layers
Wave 2: Internal Services
├── Internal APIs with no inbound external dependencies
├── Batch processing servers
└── Internal tooling
Wave 3: Application Tier
├── Web application servers
├── API gateways
└── Services with external-facing dependencies
Wave 4: Edge and External
├── Load balancers
├── CDN configuration
└── External DNS cutover
The key principle: dependencies flow from the top of the list toward the bottom. A server in Wave 3 depends on services in Wave 1 and Wave 2. Wave 3 migrates after Wave 1 and Wave 2 are stable in AWS, so that the migrated Wave 3 servers can reach their dependencies without needing to traverse a VPN back to on-premises.
The non-obvious complication: circular dependencies. Application A depends on Application B, and Application B depends on Application A. In the on-premises environment, both are on the same LAN and the circular dependency is invisible: the round-trip is sub-millisecond. In a migration, you can't migrate A before B or B before A without breaking the other. Circular dependencies discovered during dependency mapping require either architectural refactoring before migration, or both applications migrating in the same wave with a temporary bridge during the migration window.
AWS Application Migration Service for Lift-and-Shift
For servers being migrated without refactoring (lift-and-shift), AWS Application Migration Service (MGN) is the right tool. MGN installs a replication agent on the source server, continuously replicates the disk to an AWS staging environment, and allows you to launch test instances in AWS before cutting over production traffic. The cutover window is the time between stopping replication and starting the AWS instance in production, typically under an hour for most servers.
The critical configuration decision in MGN is the launch template that determines what the migrated instance looks like in AWS: instance type, subnet, security groups, IAM instance profile. These must be configured correctly before the test launch, because the test launch validates that the application works in the AWS network environment, not just that the disk contents replicated correctly.
The non-obvious behavior in MGN that affects wave planning: replication lag. MGN maintains continuous replication with typically low lag, but the lag increases under high disk write I/O on the source server. For servers with heavy write workloads (database servers, log aggregators, high-volume application servers), the lag at cutover time can be significant. Plan the cutover window for low-activity periods, and check the replication lag in the MGN console before cutting over. A cutover with 6 hours of replication lag means 6 hours of data loss on the migrated instance.
Enjoying this so far?
Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.
No spam. Unsubscribe anytime.
Tradeoffs & Decision Framework
The dependency mapping investment exists on a spectrum, and the right level depends on environment complexity and migration risk tolerance.
Lightweight discovery (small environments, 10-50 servers, low complexity): Manual application team interviews and network firewall rule review. Pull the firewall allow-list for each server to identify what it communicates with. Supplement with two weeks of ADS agent data to catch connections the teams don't know about. Total discovery time: one to two weeks. Good enough for environments where application teams have accurate mental models of their dependencies.
Structured discovery (medium environments, 50-200 servers, multiple application owners): Full ADS agent deployment with four-week collection window. Export connection data to Migration Hub and generate dependency visualization. Workshop with application owners to categorize connections (critical synchronous, async, monitoring-only). Formal wave planning document with dependency rationale. Total discovery time: four to six weeks. Required when application owners' knowledge of dependencies is incomplete or inconsistent.
Deep discovery (large environments, 200+ servers, regulated industry, or significant revenue at risk): ADS agent data plus application-level tracing. Instrument applications with AWS X-Ray or a third-party APM to capture actual call chains, not just TCP connections. Map latency requirements per dependency (which connections are latency-sensitive, which are not). Run dependency analysis tools against IIS/Apache access logs, application logs, and database query logs to supplement network connection data. Total discovery time: six to twelve weeks. Justified when the cost of a failed migration wave exceeds the cost of thorough discovery.
The tradeoff nobody likes to acknowledge: More thorough discovery extends the migration timeline and delays the cost savings and capability benefits of being on AWS. There's genuine pressure to start migrating sooner rather than spending weeks mapping dependencies. The right answer depends on the blast radius of getting the wave order wrong. For applications with low business criticality and easy rollback paths, start migrating with a lighter discovery process and accept that you'll encounter some unknown dependencies during testing. For revenue-critical applications where a failed migration means hours of downtime, invest in thorough discovery before the first server moves.
Lessons From the Field
1. The dependency that breaks migrations is always the one nobody remembered. At a manufacturing client migrating seventy-three servers to AWS, we ran ADS discovery for four weeks and conducted interviews with every application owner. We found 847 network connections and mapped them into migration waves. Post-migration wave one, a custom middleware service failed because it was calling an FTP server on a fixed IP that we'd found in the discovery data but classified as an external service. It was actually an internal FTP server that one application owner hadn't mentioned because "that's not really part of the app, it's just where we drop reports." Fixed IP, no DNS entry, undocumented. Discovery caught the connection but human interpretation missed the classification.
2. Firewall rule exports are more reliable than application team interviews. Application teams remember the dependencies they actively manage and the ones that have caused them problems. They forget the ones that just work quietly. Pulling the source-destination-port firewall allow-list for every server in scope produced seventeen dependencies that weren't mentioned in any interview at a logistics client, including one server that was sending its application logs to an on-premises syslog aggregator that nobody on the migration team knew existed.
3. Latency-sensitive dependencies require measurement, not assumption. A fintech client assumed that migrating their trading application with a VPN connection back to their on-premises database would be acceptable during the migration window while the database was migrated in a later wave. The assumption was wrong. The trading application had a 5ms response time requirement that was only achievable with sub-millisecond database latency. With VPN latency of 8-12ms to the on-premises database, the trading application response time tripled. We had to migrate the database in the same wave as the application. Measure actual latency requirements before planning wave separation.
4. MGN replication lag at cutover is the number nobody checks until it's too late. Managed a cutover for an e-commerce client where the MGN console showed replication lag of forty-five minutes for the order management server. The cutover happened anyway because the window was scheduled and the team was under pressure to hit the date. The migrated instance was forty-five minutes behind the source server when it went live. Forty-five minutes of orders were missing from the AWS instance. Recovery required a manual data reconciliation that took four hours. Check replication lag before every cutover. If lag exceeds fifteen minutes, postpone the cutover or accept the data loss with explicit stakeholder sign-off.
5. Application mapping produces a migration sequence, not just a migration list. The output of dependency mapping is not "these thirty servers need to move to AWS." It's "server A must move before server B, servers C and D must move together, server E can move any time but depends on server F being in AWS first." The sequence is the value of the mapping work. A migration plan that lists servers without sequence is incomplete. Reframe every migration planning document around waves and ordering constraints, not around server inventory.
Final Thoughts
Application dependency mapping has gotten more automated in recent years. AWS Application Discovery Service, Migration Hub, and the broader AWS Migration Hub Strategy Recommendations service (which analyzes applications and recommends rehost, replatform, or refactor strategies) have reduced the manual effort required to build an initial dependency picture. Third-party tools like CloudEndure (now integrated into MGN), Zerto, and Flexera add network traffic analysis and application portfolio management that supplement the AWS-native tooling.
What the tooling still can't do is interpret the business context of a dependency. A TCP connection from an application server to a database server on port 5432 is a dependency. Whether that connection is a critical synchronous query that requires sub-millisecond latency or an async reporting query that runs once a week is a human judgment call that determines whether the two servers must migrate together or can be in different waves. No tool makes that determination. It comes from application team knowledge, performance testing, and the kind of architecture review that produces a dependency map with business context attached to the technical connections.
Server migrations done well start months before the first server moves. The discovery, mapping, wave planning, and latency measurement that happen in the pre-migration phase are what determine whether the migration takes six weeks or six months. Skipping that work to start moving servers faster is consistently the decision that leads to the six-month outcome.
Key Takeaways
- Server migration to AWS is primarily a dependency management problem, not a server problem. Moving the server is the easy part. Understanding what else breaks when it moves, and migrating in the right order, is the hard part.
- AWS Application Discovery Service agent data captures TCP connections, not application-level dependencies. The raw data requires human interpretation to classify connections as critical synchronous, async, or monitoring-only. Supplement with application team interviews and cron job audits to surface periodic dependencies that don't appear in a two-week network traffic window.
- Wave planning converts a dependency map into a migration sequence. The output of dependency mapping is not a server list, it's an ordered sequence of migration waves where each wave's servers can depend on all prior waves being stable in AWS.
- Circular dependencies require same-wave migration or architectural refactoring before migration. Two servers that depend on each other cannot be in sequential waves. Identify circular dependencies during discovery, not during wave execution.
- Check MGN replication lag before every cutover. A migrated instance with significant replication lag at cutover is an instance that's missing that much data when it goes live. If lag exceeds your acceptable data loss threshold, postpone the cutover or get explicit stakeholder sign-off on the gap.
- Firewall rule exports are more reliable than application team interviews for dependency discovery. Teams remember dependencies they actively manage and forget the ones that quietly work. Pulling the source-destination-port allow-list for each server in scope surfaces dependencies that interviews miss.
- Latency-sensitive dependencies must be measured, not assumed. An application that performs acceptably with sub-millisecond LAN latency to its database may be unacceptable with 10-15ms VPN latency to that same database during a phased migration. Measure actual latency requirements before planning wave separation for latency-sensitive dependencies.
Get insights like this in your inbox
Join thousands of engineers receiving practical engineering, Cloud, Distributed Systems, Infrastructure and AI engineering insights.
No spam. Unsubscribe anytime.