Three MySQL Aurora replication
High-level ideas to replica your aurora cluster
Cross-region replication between two aurora MySQL DB cluster
First, you need to enable binary logging (binlog) in the parameter group. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.MySQL.BinaryFormat.html
The binary log is a set of log files that contain information about data modifications made to a MySQL server instance. The MySQL binlog utility can print binary or relay log contents in a readable form, which means it can be used when you replicate (relay) the contents between the databases.
Second, you create a cross-region read replica in another region. (Actions -> Create cross-Region read replica)
You also can promote the replica in a different region to a standalone DB cluster.
Replication between aurora MySQL DB cluster in the same region
Similar to cross-region replica, you should enable binary logging in the source cluster and then follow the below instruction.
- Create a snapshot from the source database
- Load data from the snapshot
- Start binlog replication (What is binlog replication? https://dev.mysql.com/doc/refman/5.7/en/binlog-replication-configuration-overview.html)
Replication between RDS DB instance and Aurora DB instance
AWS also supports replications between RDS and Aurora, in most cases, this is used for the migration (RDS -> Aurora).
- You can create the aurora read replica from the RDS DB instance
- Stop the writes to the master database
- Check if the replication lag is zero
- Promote the aurora replica as a standalone (as primary)