How I implemented database migration on AWS using AWS DMS

Adetokunbo Ige
3 min readJul 20, 2024

--

As a Software Engineer, I would like to replicate a copy of my database from on-premise infrastructure to AWS. This will require me to look for a perfect tool to get the job done without encountering data loss or database integrity issues. AWS Database Migration Service (DMS) is very helpful in achieving such tasks very quickly and efficiently.

AWS DMS also known as AWS Database Migration Service (DMS) helps to migrate data to AWS securely and easily. During the database migration using DMS, the source database remains fully operational during the data migration without any downtime to the application. It is essential to ensure that there is no downtime or issues to the application while transferring data to the target database, using AWS DMS ensures that this is possible.

AWS Database Migration Service (AWS DMS) supports several use cases, including migrating data from Oracle to Oracle server and Oracle to MS SQL Server, among others. AWS DMS supports a wide range of database engines for both source and target databases, making it a versatile tool for database migrations. For more detailed information about the supported database engines and other capabilities, please refer to the AWS DMS Documentation

One of the things I found fascinating about AWS Database Migration Service (AWS DMS), is how DMS can be configured to continuously migrate data into a huge data warehouse without any significant effort.

This article shows an example of how to use AWS DMS to migrate data between PostgreSQL RDS and Onpremise PostgreSQL Database. This is an assumption that you already have an underdstanding of Databases and AWS.

AWS Database Migration Service (AWS DMS) can migrate your data to and from the most widely used commercial and open-source databases. Here’s a general step-by-step guide on how to perform a data migration using AWS DMS:

Step 1: Establish Network Connectivity between Source and Target Databases

Before starting with AWS DMS, ensure that you have established secure network connectivity between the on-premise database and target databases in AWS. Also, implement the following

  • Set up network connectivity with either option such as VPN connections, AWS Direct Connect, or VPC Peering. Also, implement
  • Encryption for data both in rest and transit to ensure the data is secure during data transfer.
  • Configure firewall rules to allow necessary network traffic.
  • Use IAM roles and policies to manage permission securely
  • Configure security groups to ensure communication between the two networks (Source database and Target Database).

Finally, test the network connectivity between the source and target database.

Step 2: Set Up Your Source and Target Databases

Before starting with AWS DMS, ensure that both your source and target databases are set up and accessible.

Step 3: Create a Replication instance

The first step during the database replication is to create a replication instance. AWS DMS uses the replication instance to perform your database migration.

Step 4: Configure Source and Target Endpoints

The first step during the database replication is to create a replication instance. AWS DMS uses the replication instance to perform your database migration.

Conclusion

I hope you find this process of how i implemented database migration using AWS DMS. Please do let me know if there are other tools or technologies you have used in migrating data from one database to another.

--

--

Adetokunbo Ige

SRE, DevOps, Software dev, Enterprise App Mgt , Server Infrastructure Mgt, Cloud technologies, Database Mgt, Incident Mgt