Migrate AWS RDS to GCP Cloud SQL in Five Simple Steps

Migrate AWS RDS to GCP Cloud SQL

On March 31, 2021, there was a great announcement from Google Cloud Platform on Database Migration Service(DMS) that makes it easier for you to “lift and shift” (Rehost) your MySQL and PostgreSQL workloads into Cloud SQL for MySQL and Cloud SQL for PostgreSQL respectively.

Since DMS currently focuses on homogeneous migrations, migrations across compatible database engines in this article, we explore how to migrate AWS RDS for MySQL 8.0 to Cloud SQL for MySQL 8.0.

Prerequisite

Existing AWS RDS for MySQL 8.0 with Public accessibility in any availability zone of your choice. For demonstration purpose Employees database from GitHub is used.

AWS RDS for MySQL 8.0

The game starts now...

Make sure you have a GCP Project with Billing enabled and APIs like Compute Engine API, Database Migration API and so on are enabled

  1. Create a Connection Profile 

create connection profile in GCP

2. Now lets create a migration job using Migration Job wizard with Migration job type set to One-time

Describing Migration Job

3. Define the source using the Connection Profile creation in step #1

Connection Profile creation

4. Create a destination, make sure you use the same MySQL version which was provisioned in AWS RDS. For simplicity reason Cloud SQL for MySQL used will have Public IP with db-n1-standard-1 machine type and 10GB HDD storage

Public IP with db-n1-standard-1 machine

You can go to Cloud SQL Page to view the destination Cloud SQL for MySQL instance provisioned

Cloud SQL page

5. Define the connectivity method as IP allowlist

Cloud Connectivity Method

Now, copy the Destination outgoing IP address and go to AWS Security Group page and whitelist it for 3306 port

Editing inbound rules

6. The final is to Test and Create Migration Job by clicking on Create Job button

Test and Create Migration

Now, click on the start

Creating Migration Job

After few minutes the status keeps changing from DRAFT → CREATING → STARTING → RUNNING, FULL_DUMP → PROMOTE_IN_PROCESS → COMPLETED

Creating Migration Job
Source and Destination Database

Lastly, as a verification go to Cloud SQL instance’s Databases page to see employees database successfully migrated

Cloud SQL instance’s Databases

Benefits

  1. Easy-to-use and Serverless Migration tool

  2. Database Migration Service is offered at no additional cost. Also there’s no additional charge for network ingress from AWS RDS for MySQL.

Conclusion

Easily migrate AWS RDS for MySQL and AWS RDS for PostgreSQL instance to Cloud SQL for MySQL and Cloud SQL for PostgreSQL respectively using completely a Free & Serverless migration service in simple 5 fives

Previous
Previous

Migrate AWS S3 Bucket to Google Cloud Storage - Storage Transfer Service

Next
Next

Google Meet Changes - 2020