Simplify Data Migration with AWS DMS
This article was published as a part of the Data Science Blogathon.

Introduction
What is AWS DMS?
Why Consider AWS DMS for Data Migration?
-
Highly resilient:
DMS can automate the backup snapshots and restore them very quickly. If the primary replication server fails, the backup replication server will take over; hence there is no service interruption.
- Minimal downtime:
While migrating databases through DMS, the source database will be fully operational, minimizing downtime to applications that rely on the database. So users can change databases whenever required without a need to shut down.
- Low cost :
DMS provides a free migration service for moving databases to Redshift, Aurora, DynamoDB, or DocumentDB. Users must pay for migrating to other databases depending on the log storing volume.
- Comprehensive Database Support:
DMS supports homogeneous migrations such as Oracle to Oracle and heterogeneous migrations Oracle to Aurora platforms using the SCT tool. It supports open-source and commercial databases helping in convenient database migration.
- Failover support :
DMS are deployed in a multi-AZ environment which helps in failover support and easy availability. In a Multi-AZ deployment, DMS automatically maintains and provisions a synchronous standby replica of the replication instance in a different Availability Zone.
AWS DMS Process- How it Works
- Connect endpoints:
First, connect DMS to both source and target endpoints. The primary requirement for DMS is that one user’s endpoints must be hosted on AWS service. For performing the migration, endpoint credentials should successfully connect to the databases with the essential privileges.
- Task scheduling:
Now schedule a task that runs on the server to migrate the data. DMS reads the data from the source database and prepares it for the target database. Full-load migration occurs when source data is transferred to the target database.
- Sync databases:
If any changes are made at the source database, it is cached on the replication server. Soon after the full-load migration is completed, these cached changes are applied to the target database to keep both databases in sync.
Types of Supported Databases
Source: https://www.logicata.com/blog/aws-database-migration-service
- Amazon EC2 and RDS:
Users can use Amazon EC2 or RDS DB instances as a target for data migration. EC2 is the virtual machine representing a physical server that provides secure and scalable computing capacity. RDS refers to an SQL database service allowing access to files and databases anywhere.
- AWS Schema Conversion Tool:
AWS Schema Conversion Tool or SCT automatically converts source schema to a compatible format for your target database. With SCT, users can migrate database schema, including stored procedures, views, functions, etc., to compatible target databases.
- Amazon S3:
For storage purposes or while migrating large amounts of data, Amazon S3 can be used in the intermediate step. Users can set up a Database Migration Task, which transfers specific data to the S3 bucket. - AWS CloudFormation :
AWS CloudFormation can set up AWS resources for infrastructure deployment or management. Using CloudFormation templates, users can create, delete, and modify the entire stack (collection of AWS resources) as a single unit or stacks across multiple AWS accounts and regions without managing resources individually.
Components of AWS Database Migration Service
- Replication instance
- Source & Target Endpoints
- Replication tasks
Replication instance:
Source & Target Endpoints:
Replication tasks:
Use cases
Source: https://www.heptabit.com/blog/database-migration-to-aws-with-no-downtime
Building a migration plan:
Continuous Data Replication:
Conclusion
- AWS DMS helps migrate databases to AWS quickly and monitors source and target databases.
- Deployed in a multi-AZ environment for easy availability.
- AWS Schema Conversion Tool or AWS SCT can be used with DMS to automatically convert source schema to a compatible format for your target database.
- Mainly three components – Replication instance, Source & Target Endpoints, and Replication tasks.
- Support both homogeneous and heterogeneous database migrations.
- Endpoints refer to the two data stores, i.e., the source and the target.
- DMS helps in the replication of data continuously and synchronizes development and testing environment locations.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.