Skip to content
Guide · AWS

AWS Database Migration Service (DMS): Step-by-Step Guide

AWS Database Migration Service (AWS DMS) copies data from a source database to a target, once or continuously, using a replication instance or DMS Serverless that sits between them. This guide explains the parts you configure, walks through a SQL Server to Amazon RDS for PostgreSQL migration as AWS documents it, and covers schema conversion, validation, pricing and the Azure equivalent.

Facts checked 8 October 2026 against the providers' official documentation and pricing pages. Versions covered: AWS DMS replication engine 3.5.x and 3.6.x (DMS Serverless engine 3.5.4), DMS Schema Conversion, AWS CLI v2; Azure Database Migration Service (Azure portal version). Next review due January 2027. Cloud services, regions and prices change often; confirm on the provider's site before you buy.
Short answer
  • AWS DMS moves data, not schema code: it creates tables and primary keys if they are missing, but secondary indexes, foreign keys, views, procedures and users come from DMS Schema Conversion, the older AWS Schema Conversion Tool, or your own scripts.
  • You configure three things: a replication instance (or a DMS Serverless replication), a source and a target endpoint, and a task that is full load, full load plus change data capture (CDC), or CDC only.
  • For low-downtime cutovers, run full load plus CDC so the target keeps up with the source, then stop writes, let the last changes apply and switch the application.
  • Cost is mainly the hourly replication instance (or DCU-hours on Serverless) plus storage above the included amount; DMS Schema Conversion itself is free apart from the Amazon S3 storage it uses.
  • Azure Database Migration Service is Microsoft's counterpart for moving SQL Server into Azure SQL; it is not a general any-to-any replication tool like AWS DMS.
How we know: Research-based: components, console settings, CLI options, limits and prices were checked against the AWS DMS User Guide, the AWS CLI command reference, the AWS DMS pricing page and AWS price data, and the Azure sections against Microsoft Learn and the Azure pricing page, on 8 October 2026. We have not run these migrations or commands for this guide; follow the AWS page if your engine version or console differs.

What is AWS Database Migration Service?

AWS Database Migration Service (AWS DMS) is a managed service for moving data between databases: relational engines, data warehouses, NoSQL stores and services such as Amazon S3. At a basic level, AWS describes it as a server in the AWS Cloud that runs replication software. You tell it where to read (the source endpoint) and where to write (the target endpoint), then run a task on that server to move the data. One of the two endpoints must be on an AWS service; AWS DMS cannot migrate from one on-premises database to another.

AWS DMS handles both homogeneous migrations (SQL Server to SQL Server, PostgreSQL to PostgreSQL) and heterogeneous ones (SQL Server or Oracle to PostgreSQL). For heterogeneous moves the schema has to be converted first. AWS now points to DMS Schema Conversion, a web-based feature inside the DMS console, and calls the downloadable AWS Schema Conversion Tool (AWS SCT) the legacy option. DMS Fleet Advisor, the old discovery feature, reached end of support on 20 May 2026.

If you are deciding where the target database should live, start with AWS database services compared and what Amazon RDS is. For the whole migration process, not just the AWS tooling, see the database migration guide.

How AWS DMS works: replication instance, endpoints and tasks

Replication instance. DMS creates it on an Amazon EC2 instance in your VPC. It connects to the source, reads and reformats the data, and loads the target; most work happens in memory, with large transactions, cached changes and logs spilling to disk. Instance classes are T3 (burstable, suited to testing and periodic loads), C5/C6i/C7i (compute optimised) and R5/R6i/R7i (memory optimised). AWS suggests the R classes for heavy CDC workloads with many transactions per second. A Multi-AZ option keeps a synchronous standby in another Availability Zone, and the console guidance is to turn it on if you intend to use CDC.

Endpoints. An endpoint holds the connection details for one data store: engine, server name, port, credentials (typed in, or held in AWS Secrets Manager) and SSL mode. Extra driver behaviour is set with endpoint settings.

Tasks. A task links a replication instance with a source and target endpoint, selects tables with table-mapping rules and picks a migration type. Each task can also enable data validation, set LOB handling and choose a target table preparation mode.

AWS DMS migration types (console label and API value)
Console optionAPI valueWhat it doesTypical use
Migrate existing datafull-loadCopies the tables once, loading tables in parallelMigrations where you can stop the application during the copy
Migrate existing data and replicate ongoing changesfull-load-and-cdcFull load, then applies changes captured during and after the load as committed transactionsLow-downtime migrations
Replicate data changes onlycdcReads the source transaction log and applies changes onlyWhen the target was loaded by a native backup or another tool

Step by step: SQL Server to Amazon RDS for PostgreSQL

The steps below follow the order AWS gives in its getting-started tutorial (convert the schema, create a replication instance, create endpoints, create and start a task, verify) applied to a common case: a self-managed SQL Server database moving to Amazon RDS for PostgreSQL with full load plus CDC.

1. Check the source supports CDC

AWS DMS lists SQL Server 2012 to 2022 as sources (2008 and 2008 R2 on DMS 3.5.4). Enterprise, Standard, Workgroup, Developer and Web editions support full load; CDC needs Enterprise, Standard (2016 and later) or Developer. Express edition is not supported. The database must use the Full or Bulk-logged recovery model and have a full backup.

On a self-managed SQL Server, DMS captures changes with MS-Replication for tables with primary keys and MS-CDC for tables without them. With the sysadmin role, the documented MS-CDC set-up is shown below. On Amazon RDS for SQL Server, use exec msdb.dbo.rds_cdc_enable_db 'DB_name' instead of sp_cdc_enable_db. Without MS-Replication or MS-CDC, tables without a primary key only have INSERT and DELETE events captured.

T-SQL: enable MS-CDC on a self-managed SQL Server source (as documented by AWS)
USE [mydb];
EXEC sys.sp_cdc_enable_db;

-- repeat for each table that needs MS-CDC
EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name   = N'orders',
    @role_name     = NULL;

2. Convert the schema with DMS Schema Conversion

DMS Schema Conversion uses three resources: an instance profile (network and encryption settings), a data provider for each database (type, server name, port) and a migration project that ties them together with Secrets Manager secrets for credentials. In the project you run an assessment report, convert tables, views, procedures and functions, review the result, and then apply the converted code to the target or export it as SQL scripts to S3. Where the rules cannot convert an object, it can use generative AI to convert more of it for you to review, and it adds an extension pack to emulate some SQL Server features.

Two SQL Server to PostgreSQL settings are worth deciding early. Object names are folded to lower case by default (set case sensitivity on if your code relies on mixed-case names), and the target schema name defaults to database_schema, for example AdventureWorks_dbo; choose the SCHEMA option if you want plain dbo. The type and T-SQL differences you will meet are covered in the SQL Server to PostgreSQL migration guide.

3. Create the replication instance

  1. In the AWS DMS console, choose Replication instances, then Create replication instance.
  2. Enter a Name, choose an Instance class and an Engine version.
  3. Under High Availability, choose the Multi-AZ option if the task will run CDC.
  4. Set Allocated storage (GiB); AWS says the default is usually enough but to watch storage metrics during large loads.
  5. Choose the VPC and Replication Subnet Group (the one containing the source if it is in a VPC), and decide on Publicly accessible, which cannot be changed later.
  6. Under Advanced, pick the Availability Zone of the source, the VPC security group and the KMS key.

4. Create the source and target endpoints

Choose Endpoints, then Create endpoint, once for each side. Set Endpoint type (source or target), the engine, an Endpoint identifier, and either Secrets Manager or the server name, port, user name and password. For an RDS target you can pick Select RDS DB Instance instead of typing the host. The DMS user on SQL Server needs the permissions listed in the SQL Server source chapter; sysadmin is the simplest route on a self-managed server.

5. Create the task and start it

  1. Choose Database migration tasks, then Create task.
  2. Pick the replication instance and both endpoints, and set Migration type to Migrate existing data and replicate ongoing changes.
  3. Because the schema was created in step 2, set Target table preparation mode to Do nothing or Truncate. Drop tables on target recreates tables with primary keys only, without secondary indexes, other constraints or column defaults.
  4. Choose LOB handling: Limited LOB mode is faster but truncates values above the maximum LOB size; Full LOB mode copies everything more slowly.
  5. Tick Enable validation, add a selection rule for the schema, and choose Create task.

On PostgreSQL, foreign keys are implemented with triggers, and AWS strongly recommends disabling them during the full load, for example with the session_replication_role parameter. AWS also recommends creating secondary indexes after a large full load rather than before, unless the data set is small.

table-mappings.json: include every table in the dbo schema
{
  "rules": [
    {
      "rule-type": "selection",
      "rule-id": "1",
      "rule-name": "1",
      "object-locator": { "schema-name": "dbo", "table-name": "%" },
      "rule-action": "include"
    }
  ]
}
AWS CLI: the same set-up from the command line (placeholders in angle brackets)
aws dms create-replication-instance \
  --replication-instance-identifier sqlserver-to-pg \
  --replication-instance-class dms.t3.medium \
  --allocated-storage 100 \
  --multi-az

aws dms create-endpoint --endpoint-identifier sqlserver-source \
  --endpoint-type source --engine-name sqlserver \
  --server-name <source-host> --port 1433 \
  --username <dms-user> --password <your-password> --database-name mydb

aws dms create-endpoint --endpoint-identifier postgres-target \
  --endpoint-type target --engine-name postgres \
  --server-name <rds-endpoint> --port 5432 \
  --username <pg-user> --password <your-password> --database-name mydb

aws dms create-replication-task \
  --replication-task-identifier mydb-full-load-cdc \
  --source-endpoint-arn <source-endpoint-arn> \
  --target-endpoint-arn <target-endpoint-arn> \
  --replication-instance-arn <replication-instance-arn> \
  --migration-type full-load-and-cdc \
  --table-mappings file://table-mappings.json

aws dms start-replication-task \
  --replication-task-arn <task-arn> \
  --start-replication-task-type start-replication

6. Validate and cut over

With validation enabled, DMS starts comparing rows as soon as each table finishes its full load and then checks CDC changes as they arrive; validation needs a primary key or unique index on each table. Before cutover, stop application writes, let the remaining changes apply, then stop the task. DMS does not migrate sequences during ongoing replication, so set each PostgreSQL sequence (or identity) to the next value after replication stops, then point the application at the new endpoint. Our database migration checklist lists the checks to run before and after the switch.

AWS DMS Serverless and homogeneous data migrations

DMS Serverless removes the replication instance. You still create endpoints, but instead of a task you create a replication configuration; when it starts, DMS reads the source metadata, works out the capacity it needs and scales between the minimum and maximum DMS capacity units (DCUs) you allow. One DCU equals 2 GB of RAM, and AWS offers 1, 2, 4, 8, 16, 32, 64, 128, 192, 256 and 384 DCUs. The current Serverless engine version is 3.5.4, and it has its own list of limitations to check before you choose it.

Homogeneous data migrations are a separate, instance-free option for like-to-like moves (MySQL or MariaDB, PostgreSQL, and MongoDB or Amazon DocumentDB) that uses the engines' native tools, and is billed per migration hour.

Azure Database Migration Service in brief

Azure Database Migration Service (Azure DMS) is Microsoft's managed migration service. Its current version is driven from the Azure portal, PowerShell and the Azure CLI, and the overview page says it currently supports SQL Server modernisation to Azure: offline migrations to Azure SQL Database, and online or offline migrations to Azure SQL Managed Instance and SQL Server on Azure Virtual Machines, including schemas. Assessment, SKU recommendations, login migration and TDE-encrypted databases are not part of the portal version (separate PowerShell and CLI tutorials cover logins and TDE). Microsoft also documents MySQL, PostgreSQL and MongoDB migration tutorials under the same service.

The Azure pricing page lists a free Standard tier for offline migrations and a paid Premium tier for online migrations. If your target is Azure SQL Database or Azure SQL Managed Instance, compare Azure DMS with SQL Server Migration Assistant, which converts Oracle, MySQL, Access, Db2 and SAP ASE schemas to SQL Server.

When to use AWS DMS, and alternatives

  • Good fit: moving a database into AWS with little downtime, changing engines (with Schema Conversion first), consolidating several sources, or keeping a copy in sync with CDC for a period.
  • Poor fit: small databases you can stop for an hour (a native dump and restore is simpler, see database migration methods), on-premises to on-premises moves (not supported), and schema-only work.
  • Limits to plan for: sequences, secondary indexes, users and code objects are not carried by the data task; LOB settings trade speed against truncation; validation needs keys.
  • Alternatives: native backup and restore or dump tools for same-engine moves, pgloader for MySQL or SQL Server to PostgreSQL, and Azure DMS or SSMA when the target is Microsoft's platform.

Pricing

Prices from the provider's official pricing pages, checked 8 October 2026, region US East (N. Virginia), in USD, excluding tax. List prices only; discounts, commitments and your actual usage change the bill.

AWS DMS has three pricing options: on-demand replication instances, DMS Serverless and Database Savings Plans. On-demand instances are billed per hour by instance class, with a separate rate for Multi-AZ. T3 instances run in unlimited mode, so sustained CPU above the baseline is charged as CPU credits at 0.075 USD per vCPU-hour. T2 and T3 instances include 50 GB of storage (C4, R4 and R5 include 100 GB); extra replication storage is billed per GB-month. DMS Serverless is billed per DCU-hour, homogeneous data migrations per migration hour, and DMS Schema Conversion is free apart from Amazon S3 storage.

Data transfer into DMS is free, as is transfer between DMS and RDS or EC2 databases in the same Availability Zone; standard AWS rates apply across AZs, Regions or out of AWS. Free tier: accounts that signed up before 15 July 2025 get 750 hours a month of Single-AZ dms.t3.micro and 50 GB of storage for a year; accounts created after that date get a credit-based Free Plan or Paid Plan with 100 USD in credits (and up to 100 USD more), valid for up to twelve months. Prices exclude tax.

AWS DMS prices, US East (N. Virginia), from AWS price data
ItemSingle-AZMulti-AZ
dms.t3.micro (2 vCPU, 1 GiB)0.0186 USD per hour0.0372 USD per hour
dms.t3.medium (2 vCPU, 4 GiB)0.0745 USD per hour0.149 USD per hour
dms.c6i.large (2 vCPU, 4 GiB)0.119 USD per hour0.238 USD per hour
dms.r6i.large (2 vCPU, 16 GiB)0.176 USD per hour0.353 USD per hour
Replication storage (General Purpose SSD)0.115 USD per GB-month0.23 USD per GB-month
DMS Serverless, per DCUabout 0.0819 USD per DCU-hourabout 0.1639 USD per DCU-hour
Homogeneous data migrations0.09 USD per migration hour

Example: one-month SQL Server to RDS PostgreSQL migration on a replication instance

  • dms.t3.medium, Multi-AZ (AWS advises Multi-AZ for CDC), running full load plus CDC for 30 days (720 hours)
  • 100 GB allocated storage, of which 50 GB is included with T3
  • Source and target in the same Availability Zone as the replication instance, so no DMS data transfer charge
  • Average CPU stays within the T3 baseline (no CPU credit charges)
  • Excluded: the RDS for PostgreSQL target, the source server, CloudWatch, tax
ItemBasisEstimated per month
Replication instance720 h x 0.149 USD107.28 USD
Extra replication storage50 GB x 0.23 USD11.50 USD
Estimated totalAbout 118.78 USD for the month

Example: the same migration on DMS Serverless

  • Multi-AZ Serverless replication averaging 2 DCUs over 720 hours (actual capacity depends on the workload)
  • Excluded: target database, data transfer across AZs or Regions, tax
ItemBasisEstimated per month
Serverless capacity720 h x 0.3277 USD (2 DCUs, Multi-AZ)235.97 USD
Estimated totalAbout 236 USD for the month; a smaller average DCU count lowers this proportionally

Worked examples are estimates calculated from the list prices above; they are not quotes or measured bills.

Frequently asked questions

What is AWS DMS used for?

Moving data from a source database to a target, either once (full load) or continuously (change data capture), usually to bring a database into AWS or to change engines with little downtime. Schema conversion is a separate step done with DMS Schema Conversion or AWS SCT.

How much does AWS DMS cost?

You pay per hour for the replication instance (or per DCU-hour on DMS Serverless) plus replication storage above the included amount and any cross-AZ or cross-Region data transfer. In US East (N. Virginia) a Multi-AZ dms.t3.medium running for a month comes to roughly 120 USD with modest storage; see the pricing section for the rates used.

Is AWS DMS Serverless cheaper than a replication instance?

AWS says Serverless is generally more cost-effective because it scales with demand, but the answer depends on how much capacity your workload actually uses. A steady, small migration can cost less on a right-sized replication instance; a spiky one may cost less on Serverless.

Does AWS DMS migrate stored procedures, indexes and users?

No. The data task creates tables and primary keys if they are missing. Secondary indexes, foreign keys, views, procedures, functions and users come from DMS Schema Conversion, AWS SCT or your own scripts, and sequences need resetting after replication stops.

Can AWS DMS migrate from SQL Server Express?

No. AWS lists SQL Server Express edition as unsupported as a DMS source. Use a native backup or a tool such as SSMA or pgloader instead, or move the database to a supported edition first.

What is the difference between AWS DMS and Azure DMS?

AWS DMS is a general replication service with many source and target engines and optional CDC. Azure Database Migration Service focuses on moving SQL Server into Azure SQL Database, Azure SQL Managed Instance or SQL Server on Azure VMs, with separate tutorials for MySQL, PostgreSQL and MongoDB.

Sources

Checked 8 October 2026.

How we research cloud database guides: our editorial method. CodeWithSQL earns nothing from the providers mentioned.

Choosing where to run your database?

Start with the section overview, or compare providers side by side.