Brook Preloader

Blog

Migrating data from Amazon RDS to Cloud SQL using DMS

Purpose of the article: This article used to migrate data from Amazon RDS MY SQL instance to Google Cloud SQL migration instance using data migration services by establishing an IP connectivity.

Intended Audience: Everyone

Tools and Technology: Tool- Amazon RDS, Cloud SQL, Cloud DMS Technology- Amazon RDS, Google cloud platform

Keywords: Cloud SQL, Source, Database, Destination, Amazon RDS, IP allow list, Migration.

Description:

Google Cloud Data migration services used migrate one-time or continuous data to cloud SQL using different connectivity methods. To migrate data from Amazon RDS MYSQL to cloud SQL first, we will create a connection profile with AWS RDS, install the amazon CLI in google cloud and create a migration job.

STEP 1:

Initially, to get access to AWS, you should install the AWS CLI tool in Cloud Shell to access the AWS resources from Google Cloud.

Configure the AWS account by giving the following properties:

  • AWS ACCESS KEY ID
  • AWS SECRET ACCESS KEY
  • Region

STEP 2: Creating a new connection profile.

In the google cloud navigation menu, go to Data Migration Services. In DMS, click on connection profiles and create a new connection profile.

NOTE: Connection profile used to store the source database information. Using a connection profile, we will get connected to the source and create our migration jobs. Connection profiles reuse for multiple migration jobs.

  • Source Database engine – Amazon RDS for MYSQL
  • Hostname – Endpoint from Amazon RDS MYSQL instance

This menu will create a new connection profile named AWS-sample.

STEP 3:  Creating a one-time migration job.

  1. Create a new migration job:
  • Click on create a migration job and add the details of your job accordingly.
Migration job namerds-to-gcp
Source Database engineAmazon RDS to MYSQL
RegionUS-east 1
Migration job typeOne –time

2. Define the Source Instance:

  • Click on source connection profile and select AWS-sample.
  • Click on Save and continue.

3. Define the destination:

  • Create your destination.
  • Select the MYSQL version (MYSQL 8.0) and instance type according to the requirement.

4. Defining the connection method

  • Click on the connectivity method and select IP to allow the list.
  • Copy the Destination IP of your instance to configure this in the Amazon RDS to establish the connection.
  • Click on Save and continue.

Step 4: Configuring the outgoing destination IP allow list in Amazon RDS.

To establish a connection between source and destination, we need to configure the destination IP in the source. For this in Amazon RDS, we need to configure the source instance security group with the destination IP allow list. Using this command, configure the destination IP.

aws ec2 authorize-security-group-ingress –group-id <sg-id>  –protocol tcp  –port 3306   –cidr <a.b.c.d>/32

Step 5: Testing and Creating a Migration job.

  • Click on Test Job
  • After testing the job successfully. click on create and start the job.

Step 6: Migration job creation:

After creating the migration job successfully, check the weather destination MYSQL instance is successful.

Output:

Now check whether the tables migrated from the Amazon RDS MYSQL instance to the destination, i.e., MYSQL instance in GCP.

Tables that are available in AWS RDS MYSQL instance:

Tables migrated into Cloud SQL MYSQL instance in GCP:

Contact Details:
Mahima Reddy INAGANTI
Associate Software Engineer, Analytics (DWH & Data lakes).
MOURI Tech

0 0 votes
Rating
guest
0 Comments
Inline Feedbacks
View all comments