Amazon RDS Aurora replication to external serverAmazon RDS Aurora (MySQL) provides its own low latency replication. Nevertheless, there are cases where it can be beneficial to set up replication from Aurora to an external MySQL server, as Amazon RDS Aurora is based on MySQL and supports native MySQL replication. Here are some examples of when replicating from Amazon RDS Aurora to an external MySQL server can make good sense:

  • Replicating to another cloud or datacenter (for added redundancy)
  • Need to use an independent reporting slave
  • Need to have an additional physical backup
  • Need to use another MySQL flavor or fork
  • Need to failover to another cloud and back

In this blog post I will share simple step by step instructions on how to do it.

Steps to setup MySQL replication from AWS RDS Aurora to MySQL server

  1. Enable binary logs in the option group in Aurora (Binlog format = mixed). This will require a restart.
  2. Create a snapshot and restore it (create a new instance from a snapshot). This is only needed to make a consistent copy with mysqldump. As Aurora does not allow “super” privileges, running mysqldump --master-data  is not possible. The snapshot is the only way to get a consistent backup with the specific binary log position.
  3. Get the binary log information from the snapshot. In the console, look for the “Alarms and Recent Events” for the restored snapshot instance. We should see something like:
  4. Install MySQL 5.6 (i.e. Percona Server 5.6) on a separate EC2 instance (for Aurora 5.6 – note that you should use MySQL 5.7 for Aurora 5.7). After MySQL is up and running, import the timezones:

    Sample config:
  5. From now on we will make all backups from the restored snapshot. First get all users and import those to the new instance:

    # check that grants are valid and upload to MySQL

    Make a backup of all schemas except for the “mysql” system tables as Aurora using different format of those (make sure we connect to the snapshot):
  6. Restore to the local database:
  7. Restore users again (some users may fail to create where there are missing databases):
  8. Download the RDS/Aurora SSL certificate:
  9. Configure MySQL replication. Take the values for the binary log name and position from #3 above. Please note: now we connect to the actual instance, not a snapshot:
  10. Verify that the slave is working. Optionally add the SQL_Delay option to the CHANGE MASTER TO (or anytime) and specify the slave delay in seconds.

I hope those steps will be helpful for setting up an external MySQL replica.

You May Also Like

For help on staying in complete control of your data when migrating to AWS Aurora, watch our webinar, Migrating to AWS Aurora: A Checklist for Success. The webinar covers how to ensure your Aurora cluster performs and operates as you expect it to and other pertinent information to guarantee a successful migration.

If your business is considering a move to the cloud via AWS, check out our webinar that details how to implement an efficient migration plan using Terraform and Percona products and solutions.

Newest Most Voted
Inline Feedbacks
View all comments
Khurram Naseem

mysqldump with terabytes of data, how we can optimise it ?

Chris Schneider

@khurram you may want to try mydumper (


Is Amazon supporting external replicas for all RDS instances or is this just an Aurora thing?


Out of interest do you have a guide to do the reverse of this? On prem MySQL to Aurora?


aws supports restoring xtrabackup backups for mysql 5.6 compatible Aurora, it doesn’t support mysql 5.7 yet.