Database Migration From Microsoft Azure to AWS

leonard isaac
4 min readDec 3, 2023

--

Within this article, I demonstrate the process of migrating a MySQL database created in Microsoft Azure to RDS MySQL on AWS Cloud using the AWS Database Migration Service. Database migration is a crucial step in ensuring seamless transitions between cloud platforms, maintaining data integrity, and optimizing performance for enhanced operational efficiency.

FlowChart showing Azure to AWS Database Migration

Prerequisites

  1. Azure Cloud
  2. AWS Cloud

Step 1: Create a Microsoft Azure MYSQL SERVER

Create Azure Database for MySQL Server

On the Networking Tab, ensure that you allow Public Access for this project(Note in most production environments this type of public access is frowned up).

Assign a resource group and wait until deployment is complete

After the deployment process finishes, utilize the Connect button to enter the bash CLI, and subsequently, furnish the password for the Azure database you established.

As soon as the correct password is provided you should see mysql> in the bash terminal

The next step create a database, create a table in the database, and insert data into the table:

Follow these steps to create a put data in the Azure database

Use SELECT * from Persons in the terminal to verify the data is inserted correctly

Select a statement showing the Persons Table

Step 2: Create a MYSQL database on the AWS Relation Database Service(RDS)

Choose Standard Create and MYSQL
To reduce charges I selected a Free Tier
Ensure you allow Public access to the SQL database
Add security group exposing the MYSQL Port 3306 to the Internet
Go to Additional Configuration and provide the initial database name: customer_db
Final AWS MYSQL Database

Step 3: Create a Replication instance on the AWS DATABASE Migration Service

Create a replication instance to make use of the Migration service -Create a name and assign the rds_security_group to the host VPC to expose 3306 to the internet

The next step is to create Endpoints for the target(AWS) AND source(Azure) Database servers

Source(Azure)

Assign a unique endpoint identifier, specify the source engine as MYSQL, and manually input access information (Note: This should not be performed in a production environment).

azure-sql-endpoint created and active

Target(AWS)

Select RDS DB Instance and choose the AWS database name you created earlier. Choose the target engine as MSQL and provide access information manually

Both Endpoints show active

Test both endpoint connections to verify that DMS can access both endpoints. This should show success if this article is followed correctly

Step 4: Create Database Migration Task

Assign a unique task identifier, select the replication instance, and also select the source and target endpoint

For Table Mappings

USE THE WIZARD OPTION, enter Schema and select the table name created in the Azure db (in my case it is called Persons)

DMS Task created

Step 5: Visualize the AWS Database to verify that migration is complete an SQL Desktop Client

AWS database endpoint or Server Address

Ensure to remember your user, and password and the initial database used to set up the AWS RDS db

Finally, you should have access to the database and see the inserted data

Thank you and i hope this was helpful in understanding using the AWS Database Migration Service. Kindly provide feedback on areas on improvements and share comments.

--

--

leonard isaac

Web Development Enthusiast, Continuous Integration and Deployment