The AWS DMS (Amazon Web Service Database Migration Service) is an optimized cloud-based platform for migrating databases from on-premises systems to the cloud, one cloud provider to another, and between data warehouses, relational databases, or NoSQL databases. Organizations can choose one-time migration or continual movement of incremental data provided both the source and the target databases are kept in sync.
The Workflow of the AWS DMS
There are two aspects to follow if AWS DMS cloud-based replication software has to function. The first is to establish a link between the source and the target databases so that the software knows from where to move the data and to which point. Next, define the activity that will help to load the data from the source to the target. Once these two are decided, AWS DMS takes over the migration process.
The whole migration process with this cloud-based software is fully automated and does not require human intervention even when the tables and the keys that are required for migration are absent in the target database. In such instances, users can create tables, indexes, views, and triggers in the target database with the AWS SCT (AWS Schema Conversion Tool). All the benefits of the cloud such as data security, data usage elasticity, cost-efficiency, and improved performances are available to users when databases are migrated with the AWS DMS.
Choices of Migration with AWS DMS
AWS DMS offers three choices for migration.
The first is full-load data migration where both the source and the target databases are shut down and all the data is moved in one go between the two points. The second is where the source and the target databases are always kept in sync and after full-load migration is completed, ongoing changes or incremental data is also captured at pre-set intervals. The last option is CDC where the changes to the data in the source database are only moved to the target database. Users can avail of any of these options for database migration with AWS DMSas per their specific requirements.
Types of Migration with AWS DMS
Two types of database migration can be carried out with AWS DMS.
Homogeneous Database Migration
This form of database migration by AWS DMS is done when the database engines, the data types and codes, and the schema structures of the source and the target are similar. This is a simple process and after linking the source and the target databases, the whole migration is completed in one go. However, this form of migration requires that the source database should either operate on an Amazon EC2 instance, or Amazon RDS database, or might even be located outside the AWS.
Forms of Homogeneous Migration are Oracle to Amazon RDS for Oracle, MySQL to Amazon RDS for MySQL, MySQL to Amazon Aurora, and Microsoft SQL Server to Amazon RDS for SQL Server.
Heterogeneous Database Migration
This database migration is chosen when the database engines, the data types and codes, and the schema structures of the source and the target are different. The migration here is a two-step process. First, the data code and the schema structure of the source database have to be transformed with the Schema Conversion Tool so that they match that of the target database. Once this task is completed, the actual AWS DMS migration process is initiated. For this type of migration, the source database can either be on an Amazon EC2 instance or an Amazon RDS database located on-site or off-premises.
Forms of Heterogeneous Migration are Oracle to PostgreSQL, Microsoft SQL Server to MySQL, and Oracle to Amazon Aurora.
One of these two methods has to be selected as per requirement when databases are migrated through AWS DMS.
Restrictions of Migrating Databases with AWS DMS
There are certain limitations faced by users when migrating databases with AWS DMS.
- Code and schema conversion issues are faced since they are handled by a third-party tool like the AWS SCT (as in Heterogeneous Migration) and not directly by AWS DMS.
- A lot of coding has to be done separately for the Change Data Capture feature which can be quite tedious and time-consuming.
- Since only limited volumes of Data Definition Language (DDL) are replicated by AWS DMS, certain replication issues crop up here too as indexes, users, and privileges not directly related to table data cannot be processed by this service.
- During the migration of databases with AWS DMS, there is often a slowing down of systems as source database resources are used in moving large volumes of data.
On the whole though, despite these limitations, AWS DMS is top of the list when it comes to database migration to the cloud.
Benefits of Migrating Databases with AWS DMS
There are several benefits of migrating databases with AWS DMS to the cloud.
- Generally, database migration has always been a long-drawn and complex activity but with AWS DMS, migration is started in minutes once configured since the software auto-deploys, manages, and monitors all necessary infrastructure
- Unmatched flexibility and scalability are provided by AWS DMS and users can scale data storage as required during migration by paying only for the resources used. Additional storage if required can be downloaded in minutes.
- All infrastructure required for migration is handled by AWS DMS including software patching, error reporting, and tracking the performance of the hardware and software.
- Users move to a more advanced and cost-effective database after migrating with the AWS DMS. This is because they get access to a wide range of managed database services like Amazon Aurora or Amazon Relational Database Service and can avail of low-cost storage platforms such as Amazon Simple Storage Service.
These are some of the reasons why AWS DMS is the most preferred option for migrating databases to the cloud.