Introduction
After enough migrations, the technical surprises stop being surprising. You expect DNS propagation to be slower than planned. You expect at least one undocumented dependency to surface post-cutover. You expect the maintenance window to run long. What you don't expect, and what I've consistently found most valuable, are the lessons that aren't in any migration playbook: the AWS-specific behaviors that only reveal themselves under migration conditions, the organizational dynamics that determine whether a technically successful cutover becomes a business success, and the findings about the pre-migration system that only become visible once it's gone.
Cloud migration lessons learned aren't just a list of things that went wrong. They're a record of what the migration revealed, about the system, about the team, and about assumptions so deeply embedded that nobody thought to question them before the migration forced the issue. The organizations that capture and apply these lessons run progressively smoother migrations. The ones that treat each migration as a standalone event re-discover the same surprises on every project.
This post covers the specific unexpected lessons that have appeared repeatedly across migration engagements: the ones that don't make it into migration guides because they're too specific, too organizational, or too counterintuitive to survive the genericization process.
Why Migrations Surface What Normal Operations Hide
The value of a migration, beyond getting off aging hardware, is what it reveals. A system that's been running in production for three years has accumulated assumptions, workarounds, and informal dependencies that nobody has had to make explicit because nothing has forced the question. Migration forces every question simultaneously.
The most common revelation: the system as it exists in production is meaningfully different from the system as it exists in documentation. Not because anyone lied, because documentation reflects intent, and production reflects reality, and the two diverge through three years of operational iteration that nobody wrote down. Migration makes the divergence visible because you have to describe the system accurately to reproduce it somewhere else.
The second revelation: performance baselines that teams thought they understood turn out to be artifacts of infrastructure characteristics that don't exist in AWS. An application that responds in 200ms on-premises may respond in 320ms in AWS not because the application is slower, but because the on-premises measurement was taken from a client on the same LAN, and the 200ms included 0ms of network time. The first AWS measurement is taken from a client over the internet, and the 120ms difference is entirely network latency that was invisible in the on-premises measurement. Teams that didn't establish baseline measurement methodology pre-migration mistake environmental measurement differences for performance regressions.
The third revelation: some problems that were attributed to infrastructure are actually application problems. A memory leak that was managed by nightly server reboots shows up as an escalating memory utilization pattern in CloudWatch within the first week in AWS, because the reboot was a manual operational workaround in the on-premises environment, and it didn't carry over to the new EC2 instance. The migration removes the workaround and the underlying problem becomes visible. This is uncomfortable but valuable: the migration created the visibility to fix a problem that had been masked for years.
The concrete example: a retail client migrated their inventory management system and observed that response times were "20% slower" in AWS compared to on-premises. Three days of investigation revealed that the on-premises measurement was taken from the application server itself (sub-millisecond round trip to localhost), while the AWS measurement was taken from an external monitoring endpoint over the internet. Same application, same response time, different measurement point. No performance regression. The migration revealed that the team's performance monitoring had been measuring something meaningless for years, and they'd been making capacity decisions based on that meaningless number.
AWS Deep Dive: The AWS-Specific Surprises That Repeat Across Migrations
The Elastic Network Interface Limit That Appears at Scale
One of the least-discussed AWS limits that surfaces during migrations of server fleets is the network interface limit per EC2 instance. Each instance type supports a specific maximum number of ENIs (Elastic Network Interfaces), and each ENI supports a maximum number of private IPv4 addresses. In a containerized environment on EC2 (ECS on EC2, not Fargate), each running container consumes an IP address from the host instance's ENI capacity, with AWS VPC CNI mode.
On-premises, containers on a server share the server's IP address and differentiate by port. In AWS VPC networking mode, each container gets its own IP from the VPC subnet. An m5.large instance supports a maximum of 3 ENIs with 10 IPv4 addresses each, 30 total. If you're running more than 30 containers on an m5.large, you'll hit an IP exhaustion error that's surfaced as a container launch failure with a networking error, not as an obvious "IP limit exceeded" message.
Teams migrating from on-premises container infrastructure to ECS on EC2, particularly those running many small containers per host, encounter this during their first deployment at scale:
# Check ENI limits for your instance type
aws ec2 describe-instance-types \
--instance-types m5.large \
--query 'InstanceTypes[0].NetworkInfo.{MaxNetworkInterfaces:MaxNetworkInterfaces,MaxIpv4Addresses:Ipv4AddressesPerInterface}'
# Calculate max containers per instance (approximate)
# Max IPs = MaxNetworkInterfaces * MaxIpv4Addresses
# Subtract 1 per ENI for the primary IP, leaving secondary IPs for containers
The solutions are instance type upgrade to one with higher ENI limits, switching to Fargate (which doesn't have this constraint), or enabling VPC CNI prefix delegation, which assigns /28 prefixes to ENIs rather than individual IPs, increasing the effective IP capacity per interface significantly. Verify current VPC CNI prefix delegation documentation as this feature has been updated across provider versions.
The NAT Gateway Pricing Surprise That Appears on the First Bill
The first AWS bill after a migration almost always includes a NAT Gateway data processing charge that nobody anticipated. This is the per-GB charge for data that passes through a NAT Gateway, separate from the hourly rate for the gateway's existence, and it adds up faster than teams expect when migrating applications that communicate with external services.
On-premises, the equivalent traffic went through a firewall or proxy with no per-GB charge. In AWS, each GB of outbound traffic from private subnets through a NAT Gateway costs $0.045 per GB in most regions (verify current pricing). An application that makes 500GB of outbound API calls per month incurs $22.50/month in NAT Gateway data processing charges that has no on-premises equivalent. At higher volumes (data pipelines, applications calling third-party enrichment services, systems downloading large datasets), this becomes a meaningful cost line.
The migration-specific surprise is discovering this on the first bill rather than in capacity planning, because the on-premises cost model had no equivalent charge and therefore wasn't included in the migration cost projection.
The remediation is a combination of VPC Gateway Endpoints (for S3 and DynamoDB, free, eliminate NAT Gateway charges for those services), VPC Interface Endpoints via PrivateLink (for other AWS services, hourly charge but cheaper than NAT Gateway data processing at high volumes), and architectural review of which external API calls are high-volume enough to optimize.
# S3 Gateway Endpoint, eliminates NAT Gateway charges for all S3 traffic
resource "aws_vpc_endpoint" "s3" {
vpc_id = aws_vpc.main.id
service_name = "com.amazonaws.${var.region}.s3"
vpc_endpoint_type = "Gateway"
route_table_ids = [
aws_route_table.private_app.id,
aws_route_table.private_data.id
]
tags = merge(var.common_tags, {
Name = "${var.environment}-s3-endpoint"
})
}
The non-obvious behavior: adding a Gateway Endpoint for S3 modifies route tables: it adds a route for the S3 prefix list to the endpoint rather than to the NAT Gateway. If your Terraform manages route tables with ignore_changes, the endpoint addition may not be reflected in your state until the next refresh. Verify that the route table change is captured in your IaC after adding the endpoint.
Timezone and Clock Assumptions That Only Appear in Production
Every migration carries timezone risk that on-premises operations never surfaced, for the same reason that on-premises server timezone was never documented: it was whatever the sysadmin set when they built the server, which was usually the data center's local timezone, which happened to match the application team's timezone, which meant it was never a problem.
EC2 instances launch with UTC as the default timezone unless explicitly configured. Linux AMIs default to UTC. Windows Server AMIs default to UTC. The migrated application, if it depends on the host timezone for any time-relative operation (scheduled jobs via cron, log timestamps, session expiration calculations, "end of business day" logic), will behave differently in UTC than it did in EST/CST/PST on-premises.
This surfaces in specific ways that take time to diagnose because the application "works": it just works on the wrong schedule. A cron job set for 0 2 * * * (2am) on an EST on-premises server ran at 2am EST. The same cron expression on a UTC EC2 instance runs at 2am UTC, which is 9pm or 10pm local time depending on daylight saving. If that job generates daily reports that finance reviews first thing in the morning, the reports that were ready at 2am on-premises are now ready at 10pm local time: not a failure, not an alarm, just a behavior change that finance notices when the reports aren't in their inbox at the expected time.
The fix is explicit: set timezone on EC2 instances at launch via user data or Systems Manager, use UTC internally and display in local time at the application layer, and audit all cron expressions and scheduled jobs for timezone assumptions before migration:
# Set timezone to UTC explicitly (Linux)
sudo timedatectl set-timezone UTC
# Or set to application team's local timezone if required
sudo timedatectl set-timezone America/New_York
# Verify
timedatectl status
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 most important tradeoff in applying migration lessons learned is between standardization and context-sensitivity. The temptation after a difficult migration is to create a checklist that prevents the specific surprise that occurred, and then treat that checklist as universal. Checklists that prevent the last migration's surprises while missing the next migration's surprises are worse than no checklist, because they create false confidence.
When to standardize migration lessons into process: Lessons that are architectural or AWS-behavioral (ENI limits, NAT Gateway pricing, timezone defaults), apply broadly across migration types and can be encoded as standard checks in a migration readiness review. These are facts about AWS that don't change by workload.
When to treat lessons as context-specific: Lessons about organizational dynamics, stakeholder communication, and application-specific behavior are highly context-dependent. The insight that "the billing team needs 48 hours notice before any migration maintenance window" is specific to the organization where it was learned. Encoding it as a universal process step for all migrations is overcorrection.
The post-migration review format that actually captures reusable learning: A structured post-migration review with two distinct sections: findings that are specific to this migration (what went wrong, what was unexpected, what would be done differently) and findings that are general (AWS behaviors or architectural patterns that should inform future migrations). Separating these prevents the over-generalization trap and produces both an accurate record of the specific migration and genuinely reusable organizational learning.
The organizational dynamics lesson that repeats most often: The team that planned the migration is not always the team that has to live with the outcome. Applications teams, finance teams, and on-call engineers all have stakes in migration outcomes that the migration team may not have fully accounted for. Post-migration reviews that include representatives from each of these groups, not just the migration engineers, surface insights that would otherwise stay inside those teams. The most actionable migration lessons usually come from the people who weren't in the war room.
Lessons From the Field
1. The most valuable migration finding is often what you discover about the pre-migration system, not the migration itself. Migrated a payment processing system for a fintech client and discovered that 23% of the application's database queries had no indexes and were performing full table scans that had been "acceptable" on on-premises hardware with fast local storage. The first week in AWS on EBS-backed RDS exposed the query patterns clearly in Performance Insights. We fixed the queries in AWS. Query performance improved by 60% compared to the on-premises baseline. The migration was the mechanism that finally created visibility into a performance problem that had existed for years.
2. Migrations reveal which engineers actually understand the system and which ones think they do. On every migration engagement, the dependency discovery phase surfaces a gap between what the team believes the system does and what it actually does. The engineers who can quickly reconcile that gap (who can say "oh, that connection is from the audit service, it was added in Q3 last year for the compliance project"), are the ones who actually understand the system. The engineers who can't are the ones who have been operating it without fully understanding it. This matters for staffing decisions and for identifying knowledge transfer gaps before key people leave.
3. The first AWS bill after migration always has at least one surprise, and the surprise is almost always data transfer. On six consecutive migration engagements, the first AWS bill contained unexpected NAT Gateway data processing charges for traffic volumes nobody had estimated. In four of those cases, S3 Gateway Endpoints that would have eliminated the charges were not in scope for the migration and had to be added post-migration. Include VPC Gateway Endpoint review as a standard pre-migration checklist item, not a post-migration cost optimization.
4. License audits always follow migrations. Every migration of systems with commercial software licenses (Oracle databases, Microsoft SQL Server, Windows Server, commercial middleware), triggers a license audit within 90 days. The license terms for on-premises and cloud deployments differ, sometimes significantly. Oracle's licensing on AWS is particularly complex, with different rules for EC2 Dedicated Hosts vs. shared tenancy instances. Get license counsel involved before migration, not after the audit notice arrives.
5. The on-call rotation for the migrated system is the real test of whether the migration succeeded. A migration where the engineering team is satisfied but the on-call engineer who inherited it is struggling is not a successful migration. The on-call experience (their ability to diagnose and respond to issues in the new environment, with the runbooks and monitoring that the migration left behind), is the operational measure of migration quality. I started including a structured on-call review at the 30-day post-migration mark: a conversation with whoever has been on call to surface gaps in runbooks, monitoring, and tooling before they cause an extended incident.
Final Thoughts
The unexpected lessons from cloud migrations are converging on a common theme: migrations are as much organizational and operational events as they are technical ones. The technical surprises (ENI limits, NAT Gateway pricing, timezone defaults), are solvable with checklists and AWS knowledge. The organizational surprises (the gap between documented and actual system behavior, the license audit that follows commercial software migrations, the on-call engineer who inherited a system without enough runbook support), require a broader definition of migration success than the technical team typically applies.
The migrations that produce the most durable organizational learning are the ones with structured post-migration reviews that explicitly seek to separate "what went wrong" from "what this taught us about how to do migrations better." The former produces incident fixes. The latter produces institutional knowledge that makes the next migration faster, smoother, and less expensive.
Every migration teaches something unexpected. The question is whether the organization captures that lesson and applies it, or whether the next migration team discovers it again from scratch.
Key Takeaways
- Migrations reveal what normal operations hide. Three years of production reality diverges from three years of documentation through operational workarounds, informal dependencies, and assumptions nobody thought to question. Migration forces every assumption to be made explicit simultaneously.
- Performance baselines measured at the application server include zero network latency. AWS baselines measured from external clients include real network latency. A "performance regression" after migration is often a measurement methodology difference, not an actual slowdown. Establish measurement methodology before migration, not after.
- EC2 ENI limits constrain containers in VPC networking mode. In ECS on EC2 with VPC mode, each container consumes an IP from the host's ENI capacity. An
m5.largeinstance supports approximately 30 secondary IPs across 3 ENIs. Migrating container fleets with high per-host container density to ECS on EC2 requires explicit ENI capacity planning or a switch to Fargate. - NAT Gateway data processing charges have no on-premises equivalent and appear as a surprise on the first migration bill. S3 Gateway Endpoints (free) and VPC Interface Endpoints eliminate NAT Gateway charges for AWS service traffic. Include endpoint review in pre-migration scope, not post-migration cost optimization.
- EC2 instances default to UTC regardless of the source server's timezone. Cron jobs, scheduled tasks, and any application logic that depends on host timezone will behave differently in UTC than in the source server's local timezone. Audit all scheduled operations for timezone assumptions before migration.
- Commercial software license terms differ between on-premises and AWS deployments. Oracle, SQL Server, and Windows Server license audits routinely follow migrations within 90 days. Involve license counsel in migration planning, not after the audit notice arrives.
- The on-call experience at 30 days post-migration is the operational test of migration quality. An on-call engineer who can diagnose and resolve issues confidently is evidence that the runbooks, monitoring, and documentation were left in good shape. An on-call engineer who struggles is evidence they weren't, and that evidence surfaces before a serious incident, if you ask.
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.