AWS Database Migration Service — How Does it Work
AWS Database Management Service is a component of the AWS Cloud. This cloud-based service helps to seamlessly migrate relational databases, NoSQL databases, data warehouses, and any other type of data store. However, databases can be migrated with AWS migration service only if one or both the source and the target databases are in the cloud. For example, it can be moving databases from one cloud provider to another or from on-premises to the cloud.
AWS DMS helps to migrate databases either in one shot or by continual replication of databases, capturing all changes made at the source and migrating to the target database. But for that to happen, it has to be ensured that the source and the target databases are always in sync. However, the AWS Schema Conversion Tool (AWS SCT) has to be used for heterogeneous migration where the databases engines of the source and the target are different.
To run AWS DMS, a connection has to be established first between the source and the target. This informs AWS DMS from which database the data has to be extracted and to where it should be loaded. The next step is to schedule a task that runs on the server that migrates the data. As part of the migration, AWS DMS automatically creates the required primary keys and the tables if that is not active in the target database. The same tables, though, can be created by the user too. AWS DMS can also be used to create triggers, indexes, and target tables for migration.
There are two types of migration with AWS DMS and the process chosen depends on the type of database being migrated and the specific needs of an organization.
The first is homogeneous database migration. This is possible when the engines of the source and the target databases are the same with data codes, data types, and schema structures matching each other. Migration in this case is a smooth and one-shot process. Examples of homogeneous migration are Oracle to Amazon RDS for Oracle, MySQL to Amazon Aurora, MySQL to Amazon RDS for MySQL, or Microsoft SQL Server to Amazon RDS for SQL Server.
The second is heterogeneous database migration. In this case, the engines of the source and the target databases are different with dissimilar data types, data codes, and schema structures. Hence, before triggering the migration, the schema structures, and the data codes have to be transformed to enable the process. This activity are automatically done by AWS DMS. Examples of heterogeneous migration are Oracle to Amazon Aurora, Oracle to PostgreSQL, or Microsoft SQL Server to MySQL.
An important benefit of AWS DMS is that it manages the full migration cycle independently. All hardware and software that is required for migration is automatically deployed, managed, and monitored and migration starts immediately once the AWS DMS configuration is completed.
This is how the AWS DMS works.