Migrating Databases to AWS and Azure: Architecture, Compatibility, Performance and Cost
Plan database modernization around engine compatibility, replication, cutover, licensing, migration tooling and verified post-migration cost and performance.
A database migration changes more than location. It can change engine behavior, licensing, operational responsibilities, failure handling and every application’s latency to its data.
A successful data copy is therefore one milestone, not the definition of a successful migration. The target must run the required workload correctly, recover within the agreed objectives, and deliver an understood steady-state cost.
Worked costs are illustrative USD assumptions. Migration-tool support and licensing depend on the exact source, target, version and commercial terms.
1. Rehost, replatform or change engines?
| Approach | Example | Main tradeoff |
|---|---|---|
| Rehost | SQL Server or Oracle moved to a VM | Retains host/database operations and licensing responsibilities |
| Replatform | Supported MySQL/PostgreSQL moved to managed hosting | Reduces infrastructure work but changes privileged access and feature availability |
| Modernize engine | Oracle application moved to a PostgreSQL-compatible target | Potential operational/licensing changes with substantial compatibility and testing work |
Choose the target by application requirements. Azure SQL Database, SQL Managed Instance and SQL Server on Azure VMs offer different compatibility boundaries. RDS SQL Server differs from SQL Server on EC2. Aurora compatibility does not guarantee every community-engine extension or behavior.
The managed database comparison provides the initial service-selection framework.
2. Inventory the whole application dependency
Record data volume and growth, write rate, large objects, engine versions, extensions, character sets, collation, schema, stored procedures, scheduled jobs and external integrations.
Inspect application connection strings, drivers, transaction boundaries, retry behavior, identity and secrets. Include reporting tools, backup jobs, operational scripts, data exports and consumers reading change streams.
Measure actual workload demand across business peaks and maintenance. An on-premises server’s full hardware size is not necessarily the target’s requirement; it may host several workloads or carry old spare capacity. Equally, average CPU alone does not capture I/O, memory or licensing needs.
3. Compatibility goes beyond schema conversion
| Area | Example of a migration issue |
|---|---|
| SQL semantics | Null behavior, implicit casts, ordering and optimizer differences |
| Data types | Numeric precision, dates, time zones, binary values and unsupported types |
| Procedural code | Packages, stored procedures, functions and trigger semantics |
| Platform features | SQL Agent, extensions, linked dependencies, filesystem or superuser access |
| Transactions | Isolation, locking, retry and distributed transaction behavior |
| Identity | Logins, database users, roles and application token support |
SQL Server applications using instance-level features can require Managed Instance or VMs rather than SQL Database, depending on the feature. Oracle-to-PostgreSQL conversion often requires application and procedural-code changes, not only translated table definitions.
MySQL/PostgreSQL moves still require checks for version compatibility, extensions, encodings, collation and privileges. A managed target can intentionally withhold operations available to an on-premises superuser.
Automated assessment is a starting point. Test the actual code paths and data values that carry business meaning.
4. Choose migration tools using the current support matrix
AWS DMS supports eligible full-load and change-data-capture migrations. DMS Schema Conversion supports assessment/conversion for supported source/target pairs; manual remediation can remain. See AWS DMS pricing and capabilities.
Azure DMS has target-specific online/offline support. Its current matrix lists SQL Database offline migration and Managed Instance online/offline paths, among others. Do not assume every Azure target has the same low-downtime workflow.
MySQL and PostgreSQL targets have native tools and service-specific migration services. Validate extensions, large-object handling, schema changes during replication, source permissions and supported versions for the chosen route.
Azure Data Studio retired on February 28, 2026. Do not start a new migration procedure around its retired extensions. Microsoft directs users to maintained development tools and target-specific migration workflows in its retirement guidance.
5. Offline versus online migration
Offline migration stops source writes while data is copied and validated. It can be simpler when the data fits an acceptable outage window.
Online migration normally seeds the target, captures source changes, applies them while the source remains active, and then uses a controlled write-freeze/cutover period. “Online” does not promise zero downtime or automatic application compatibility.
CDC depends on source logs and configuration. Retention must exceed the time needed to copy, apply and recover from interruptions. Long transactions, unsupported changes and high write churn can increase lag or source storage pressure.
Compare replication capture lag and apply lag with the business write rate. A healthy replication process that never catches up is not ready for cutover.
6. Design cutover and rollback before the copy
A practical cutover establishes a single authorized writer:
- - Confirm target capacity, permissions, recovery and application readiness.
- - Stop or fence source writes through the agreed application procedure.
- - Apply remaining changes and verify the final consistency checkpoint.
- - Switch application connectivity, refresh pools and validate critical transactions.
- - Observe the target and release the source only under the approved retirement plan.
After the target accepts writes, simply changing DNS back can lose or fork new data. Rollback needs a defined write freeze, reverse synchronization or reconciliation strategy, with an explicit decision deadline.
Test failover routing, connection caching and secret rotation. A successful administrator connection does not prove that every application instance stopped writing to the old database.
7. Validate correctness and performance
Row counts can detect some problems but do not prove data equivalence. Use suitable checksums or sampled value comparisons, reconciliation of financial/business totals, large-object checks and application-level invariants.
Test collation/order, decimal calculations, timestamps, identity/sequence behavior and transaction outcomes. Compare representative reads and writes under expected concurrency, not only a small post-copy smoke test.
The target may need new statistics, indexes, pool settings or query changes. Use query and connection diagnostics rather than increasing instance size as the first response.
Run restore and failover exercises in the target. Confirm backups, keys, retention and audit before considering the production transition complete.
8. Price the overlap as well as steady state
Assume source hosting/licensing costs $900/month and the target’s comparable steady-state architecture costs $700/month. During a full month of overlap:
| Component | Migration-month amount |
|---|---|
| Source retained | $900 |
| Target running | $700 |
| Replication compute: 100 hours × $0.50 | $50 |
| Temporary staging/backup storage | $150 |
| Migration-specific networking | $80 |
| Additional test resources | $120 |
| Resource/licensing subtotal | $2,000 |
The source-only baseline would have been $900, so the incremental overlap/migration amount is $1,100. With an assumed $4,000 of one-time engineering, the modeled investment is $5,100.
If the ongoing difference is truly $200/month, simple payback is 25.5 months. This excludes financing, further operational changes and risk; it is not a guaranteed return. Additional retention or delayed source retirement can lengthen the period.
9. Licensing and operational changes need explicit owners
Verify SQL Server/Oracle edition, deployment rights, qualifying benefits, replicas and support with the organization’s licensing owner. A lower infrastructure price is not evidence that all required licenses are included or reusable.
Managed hosting may reduce patching and backup work while introducing tier, storage, I/O, monitoring or extended-version-support charges. Commitments should match the stable target baseline after performance validation.
Do not buy a long commitment based only on the first migrated instance size. Initial warm-up, temporary tests and conservative launch capacity can overstate ongoing need.
10. Security and post-migration retirement
Use scoped migration identities, approved network paths and protected staging data. Remove temporary public access, high-privilege credentials and replication permissions when no longer required.
Retire the source deliberately: applications, jobs, old replicas, migration resources, volumes, logs, licenses and backups can survive the main cutover. Preserve approved recovery and audit retention rather than deleting everything immediately.
Track costs by migration phase and by steady-state owner. A lower target bill is not a company saving while an unnecessary source remains fully paid.
11. Keep the new database efficient over time
CloudVectra cost analysis supports cross-cloud expenditure comparisons. Cost Centers connect the target and shared dependencies with owners, while budgets and anomaly detection support ongoing review.
Use migration and database-native tools to execute replication, validate correctness and diagnose SQL behavior. CloudVectra’s role here is continuing cost visibility and governance around the resulting architecture.
Keep database modernization costs visible
Explore how CloudVectra connects AWS and Azure spending, Cost Centers, budgets and anomalies before, during and after a database migration.