A Comprehensive Guide to AWS Database Migration Service

Rate this post

AWS Database Migration Service – AWS DMS – facilitates the migration of databases to the Amazon Web Service securely and quickly. During the migration process, the source database continues to be fully functional and organizations do not have to resort to downtime of systems. An advantage of AWS DMS is that you can migrate databases from the most common and open-source ones. Further, you can replicate data continually with high availability and combine several databases into one petabyte-sized one by streaming data to Amazon S3 and Amazon Redshift. AWS DMS is offered free for the first six months when databases are migrated to Amazon Redshift, Amazon Aurora, and Amazon DynamoDB.

Types of database migration with AWS DMS

There are two types of database migration with AWS DMS

  • Homogeneous database migration

    In this type of database migration, the database engines of both the source and the target are compatible. These include MySQL to Amazon Aurora, MySQL to Amazon RDS for MySQL, Oracle to Amazon RDS for Oracle, or Microsoft SQL Server to Amazon RDS for SQL Server. This migration is an easy one-step process as the data types, schema structures, and the data codes of the source and the target databases match each other.

    Once the connection between the source and the target database is established, migration can be started with a click of a button with AWS DMS handling the entire process. The source database can either be an Amazon RDS database or it can be located on the premises outside of AWS and operating on an Amazon EC2 instance. The target database can be located in Amazon RDS or Amazon EC2.

  • AWS Database Migration Service

  • Heterogeneous database migration

    In this migration scenario, the database engines of the source and the target are different. Examples include Microsoft SQL Server to MySQL migrations, Oracle to Amazon Aurora, or Oracle to PostgreSQL. The schema structures, data codes, and data types are quite different, and hence, before starting the data migration, a schema and code transformation have to be carried out.

    Unlike Homogeneous migration, Heterogeneous migration in AWS DMS is a two-step process. First, the AWS Schema Conversion Tool (AWS SCT) has to be used to convert the data code and the schema of the source database to match that of the target database. Once this is done, AWS DMS is used for data migration from the source to the target. The data type conversions will automatically be handled by AWS DMS during the migration. For migration, the source database can either be an Amazon RDS database, located in the premises outside of AWS or operating on an Amazon EC2 instance. The target database can be in Amazon EC2 or Amazon RDS.

Use cases of AWS DMS

There are several optimized use cases for AWS DMS

  • Developing and testing

    The Database Migration Service of AWS is an optimized channel to migrate data from and into the cloud for development reasons. There are two possibilities and scenarios here. The first is deploying, testing, or staging systems in AWS. This is to avail the benefit of all cloud features like scalability and quick provisioning. It enables developers and testers to use copies of real production data and then, in a reverse process, copy the updates back to the on-premises production system.

    In the second instance when development systems are based on-premises, even on personal devices like laptops, it is possible to migrate an updated copy of an AWS Cloud production database to these on-premises systems. This may be a one-time process or a continuous one. It ensures that the existing DevOps processes are not disrupted and the updated representation of the production system is maintained.

  • Consolidation of databases

    The AWS Database Migration Service allows consolidation of several source databases into one single database as a target. This feature can be used for all supported database engines as well as homogeneous and heterogeneous migrations. The source databases can be an Amazon RDS database, an Amazon EC2 instance, or one that is located on-premises. They may also be located in different regions.

    An example will explain this point better. While a single target database may be in Amazon EC2 or Amazon RDS, one source database might be in Amazon EC2, the second on-premises, while the third an Amazon RDS database.

  • Continuous data replication

    The process of continuous data replication can be performed by AWS DMS. It has several use cases like Disaster Recovery instance synchronization, Development and Test scenarios synchronization, and geographic database distribution. DMS supports data replication for both homogeneous and heterogeneous migration for all database engines supported by it. Data can also be continually replicated from a single database at source to one or more target databases. Conversely, data from several source databases can be consolidated and replicated to one or more target databases.

Limitations of AWS DMS

While the performance and speed of AWS DMS are highly optimized, there are certain limitations too. Users often face issues with conversion and schema migration. Code and schema conversion is not done directly by AWS Database Migration Service. Instead, it creates a target schema at the target during homogeneous migration. In the case of heterogeneous migration too, schema conversion has to be done through the AWS Schema Conversion Tool. For ongoing replication, AWS DMS can replicate only a limited DDL (Data Definition Language) and cannot process users, privileges, indexes, and stored procedures that do not have a direct link with table data.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.