I can't find it from documentation, but it seems Master-Master replication is not supported at this time. Is this correct?
6 Answers
That is correct. RDS does not support Master-Master replication currently, so scaling horizontally for writes is not easily achievable, if that is your need. RDS does however support the ability to create multiple "read only" RDS slave instances, so scaling horizontally for reads is possible.
Here is RDS FAQ on replication

- 70,514
- 10
- 99
- 103
-
Is there documentation you can point to from AWS that explicitly says this? – OnResolve Jun 26 '14 at 16:13
-
@OnResolve I have added link to replication section of RDS FAQ in my answer. – Mike Brant Jun 26 '14 at 16:54
May be this link will be helpful.
Posted On: Nov 29, 2017
Amazon Aurora Multi-Master allows you to create multiple read/write master instances across multiple Availability Zones. This enables applications to read and write data to multiple database instances in a cluster, just as you can read across Read Replicas today.
Multi-Master clusters improve Aurora's already high availability. If one of your master instances fail, the other instances in the cluster will take over immediately, maintaining read and write availability through instance failures or even complete AZ failures, with zero application downtime. Today’s single-master Aurora supports one write instance and up to 15 promotable read-only replicas in a single database cluster. The primary writer instance can execute up to 200,000 write operations/sec on an r4.16xlarge. Workloads that require even higher write throughput will benefit from horizontally scaling out their writes with additional master instances. The preview will be available for the Aurora MySQL-compatible edition, and you can participate by filling out the signup form.
Amazon Aurora is a fully managed relational database that combines the performance and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases.

- 453
- 4
- 11
Yes it is possible to do Master-Master replication in RDS MySql Engine. But it need some manipulation with instances. Pre-requisite: 1) Create Read replica of both instances for enabling binary logging. 2) Delete Read replica for both of them if not required. 3) Follow the instructions for master slave setup mentioned below.
On Master1 create replication user
grant replication slave on *.* to 'admin'@'%' identified by 'admin';
Query OK, 0 rows affected (0.00 sec)
note output of below command
show master status; +----------------------------+----------+--------------+------------------+-------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +----------------------------+----------+--------------+------------------+-------------------+ | mysql-bin-changelog.000007 | 120 | |
| | +----------------------------+----------+--------------+------------------+-------------------+ 1 row in set (0.00 sec)
On Master2
mysql> call mysql.rds_set_external_master('master1.endpoint.amazonaws.com',3306,'admin','admin','**mysql-bin-changelog.000007**',**120**,0);
Query OK, 0 rows affected (0.05 sec)
mysql> call mysql.rds_start_replication;
+-------------------------+
| Message |
+-------------------------+
| Slave running normally. |
+-------------------------+
1 row in set (1.01 sec)
mysql -u admin123 -padmin123 -h master2.endpoint.amazonaws.com -e "show slave status\G;" | grep Running
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
======================================================================
On Master2
grant replication slave on *.* to 'admin'@'%' identified by 'admin';
Query OK, 0 rows affected (0.00 sec)
show master status;
+----------------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+----------------------------+----------+--------------+------------------+-------------------+
| **mysql-bin-changelog.000007** | **120** | | | |
+----------------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
On Master1
mysql> call mysql.rds_set_external_master('master2.endpoint.amazonaws.com',3306,'admin','admin','**mysql-bin-changelog.000007**',**120**,0);
Query OK, 0 rows affected (0.05 sec)
mysql> call mysql.rds_start_replication;
+-------------------------+
| Message |
+-------------------------+
| Slave running normally. |
+-------------------------+
1 row in set (1.01 sec)
mysql -u admin123 -padmin123 -h master1.endpoint.amazonaws.com -e "show slave status\G;" | grep Running
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it

- 12,158
- 7
- 41
- 68

- 31
- 1
- 3
-
I have not been able to get this to work properly. I've gotten the replication from Master 1 to Master 2 going, but the slave on Master 1 would stay in a 'connecting' state, while trying to connect to Master 2. Verified that the RDS subnet that Master1 resided in had access to Master2 and visa versa (actually launched instances in respective subnets to see if I could connect). Grants all looked good. Credentials worked. Not sure what the problem is... – Dennis Mar 14 '20 at 18:52
As of 2021, multi-master is available in Aurora with some limitations*
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html

- 1,322
- 9
- 11
Just researching it right now, but it seems they support now RDS being a slave to another MySQL instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql_rds_set_external_master.html). With the previously mentioned read-slave option a master-master replication should be doable

- 73
- 1
- 5
As of Nov. 29, 2017 Multi-Master is in preview for Amazon Aurora (MySQL Compatible DB)
We have had good results using Aurora as a MySQL 5.7 Db so I'd recommend taking a look.

- 3,715
- 2
- 24
- 22