I’ve been working on database migration, it’s going surprisingly smoothly given all the moving parts. This week I worked with the AWS Database Migration Service, and it, for the most part, also went smoothly.
What is it? Why do I need it?
AWS Database Migration Service (AWS DMS) is a web service that allows you to migrate data from one database to another. You can move database objects from the same kind of database engine or a different database engine. The only requirement is that one of them needs to be an AWS service.
With that out of the way, this is how it works and how I found the experience.
Step 1: Getting set up
You then need to create the endpoints. The source and target data stores can be on an Amazon Elastic Compute Cloud (Amazon EC2) instance, an Amazon Relational Database Service (Amazon RDS) DB instance, or an on-premises database.
Step 2: Create a Task using the UI
The good thing about using this service is that you can use the UI to run your tasks. This part requires you to specify the database endpoints and a description.
Step 3: Use the rules to select and transform
Use the Selection rule to isolate which table or group of tables you want to migrate:
Use the Transformation rules to make any changes to make sure the data arrives as expected. Options here are to make changes at Schema, Table and Column level.
When you select ‘Create task’ the task runs and gives you a progress report from the main screen.
If you make a mistake you can select ‘Modify task’ from the main dashboard screen and rerun the task with your changes.
I found that the biggest limitation was that I was unable to use two transformation rules of the same type. If I used two Table transformation rules sometimes it would pick one of them and sometimes both, resulting in two tables that needed to be cleaned up.
Not so good when you don’t have the permissions on the database side and need to sheepishly ask your DBA to script a fix.
It appears that all the work that went into using the Schema Conversion Tool may not have been necessary as the DMS created tables (accidentally when I got the transformation rules wrong) on the fly. I have yet to test if this going to work with the converted schemas but time will tell if this is a time saver doing it all in one step.
Photo by Pixabay on Pexels
This post first appeared on dev.to