# DMS

**Introduction**

* Migrates databases to AWS and remains available during migration
* Supports:&#x20;
  * Homogeneous migrations: ex. Oracle to Oracle
  * Heterogeneous migrations: ex. Microsofr SQL Server to Aurora
* Continuous Data Replication using [CDC](https://en.wikipedia.org/wiki/Change_data_capture)
* Must create an EC2 instance to perform the replication tasks
* Works over VPC Peering / VPN / Direct Connect
* Supports loads: full load / full load + CDC / CDC only

**Feature**

* Sources:
  * On-premise and EC2 instances databases: Oracle, MS SQL Server, MySQL, MariaDB, PostgreSQL, SAP, DB2, Mongo DB.
  * Azure: Azure SQL Database
  * RDS: all including Aurora
  * S3 (csv files as input)
* Targets:
  * On-premise and EC2 instances databases: Oracle, MS SQL Server, MySQL, MariaDB, PostgreSQL, SAP
  * RDS
  * Redshift
  * DynamoDB
  * DocumentDB
  * S3
  * ElasticSearch
  * Kinesis Data Steams
* Schema Conversion Tool (SCT)
  * Converts Database schema from one engine to another
  * OLTP: SQL Server / Oracle to MySQL / PostgreSQL / Aurora
  * OLAP: Teradata / Oracle to Redshift
* [Customing tasks](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html)
  * can filter data by column value
  * can filter columns according by prefix
  * can add prefix to table name
* For Oracle:
  * As source: supports TDE for the source using "BinaryReader"
  * As target: supports BLOBs in tables that have a primary key, and TDE
* For ElasticSearch:
  * As source: **NOT SUPPORTED**
  * As target: possible to migrate through DMS from a relational DB
  * [Exception with code 429 "Too many requests,"](https://aws.amazon.com/blogs/database/scale-amazon-elasticsearch-service-for-aws-database-migration-service-migrations/)
    * Calculate the number of queue slots required for the ES bulk request as a product of the number of indexes, shards, and replicas.&#x20;
    * Adjust DMS subtask and thread parameters accordingly.
* Can combine with Snowball Edge
  * Steps:
    * Use AWS Schema Conversion Tool to extract the data locally and move it into Snowball Edge
    * Ship Snowball edge back to AWS
    * Data is loaded into S3 bucket
    * DMS takes the S3 files and migrates data to the target data store. With CDC, updates are written to S3 bucket and then applied to the target data store
