Amazon Aurora
User Guide (API Version 2014-10-31)

Adding Aurora Replicas to a DB Cluster

In an Aurora DB clusters, there is one primary DB instance and up to 15 Aurora Replicas. The primary DB instance supports read and write operations, and performs all of the data modifications to the cluster volume. Aurora Replicas connect to the same storage volume as the primary DB instance and support only read operations. Aurora Replicas can offload read workloads from the primary DB instance.

We recommend that you distribute the primary instance and Aurora Replicas in your DB cluster over multiple Availability Zones to improve the availability of your DB cluster. For more information, see Availability.

You can add Aurora Replicas to a DB cluster using the AWS Management Console, the AWS CLI, or the RDS API.

To remove an Aurora Replica from a DB cluster, delete the Aurora Replica DB instance by following the instructions in Deleting a DB Instance in a DB Cluster.

For more information about Aurora Replicas, see Aurora Replicas.

Note

Amazon Aurora also supports replication with an external database, or an RDS DB instance. When using Amazon Aurora, your RDS DB instance must be in the same AWS Region. For more information, see Replication with Amazon Aurora.

AWS Management Console

To add an Aurora Replica to a DB cluster

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Instances, and then select the a DB instance in the DB cluster. The selected DB instance can be the primary DB instance for the DB cluster or an Aurora Replica.

  3. Choose Instance actions and then choose Create aurora replica.

    The Create Aurora replica page appears.

  4. On the Create Aurora replica page, specify options for your Aurora Replica. The following table shows settings for an Aurora Replica.

    For This Option Do This

    Availability zone

    Determine if you want to specify a particular Availability Zone. The list includes only those Availability Zones that are mapped by the DB subnet group you specified earlier. For more information about Availability Zones, see Choosing the Regions and Availability Zones.

    Publicly accessible

    Select Yes to give the Aurora Replica a public IP address; otherwise, select No. For more information about hiding Aurora Replicas from public access, see Hiding a DB Instance in a VPC from the Internet.

    Encryption

    Select Enable encryption to enable encryption at rest for this Aurora Replica. For more information, see Encrypting Amazon RDS Resources.

    DB instance class

    Select a DB instance class that defines the processing and memory requirements for the Aurora Replica. For more information about DB instance class options, see Choosing the DB Instance Class.

    Aurora replica source

    Select the identifier of the primary instance to create an Aurora Replica for.

    DB instance identifier

    Type a name for the instance that is unique for your account in the AWS Region you selected. You might choose to add some intelligence to the name such as including the AWS Region and DB engine you selected, for example aurora-read-instance1.

    Priority

    Choose a failover priority for the instance. If you don't select a value, the default is tier-1. This priority determines the order in which Aurora Replicas are promoted when recovering from a primary instance failure. For more information, see Fault Tolerance for an Aurora DB Cluster.

    Database port

    The port for an Aurora Replica is the same as the port for the DB cluster.

    DB parameter group

    Select a parameter group. Aurora has a default parameter group you can use, or you can create your own parameter group. For more information about parameter groups, see Working with DB Parameter Groups and DB Cluster Parameter Groups.

    Enhanced monitoring

    Choose Enable enhanced monitoring to enable gathering metrics in real time for the operating system that your DB cluster runs on. For more information, see Enhanced Monitoring.

    Monitoring Role

    Only available if Enhanced Monitoring is set to Enable enhanced monitoring. Choose the IAM role that you created to permit Amazon RDS to communicate with Amazon CloudWatch Logs for you, or choose Default to have RDS create a role for you named rds-monitoring-role. For more information, see Enhanced Monitoring.

    Granularity

    Only available if Enhanced Monitoring is set to Enable enhanced monitoring. Set the interval, in seconds, between when metrics are collected for your DB cluster.

    Auto minor version upgrade

    Select Enable auto minor version upgrade if you want to enable your Aurora DB cluster to receive minor MySQL DB Engine version upgrades automatically when they become available.

    The Auto minor version upgrade option only applies to upgrades to MySQL minor engine versions for your Amazon Aurora DB cluster. It doesn't apply to regular patches applied to maintain system stability.

  5. Choose Create Aurora replica to create the Aurora Replica.

CLI

To create an Aurora Replica in your DB cluster, run the create-db-instance AWS CLI command. Include the name of the DB cluster as the --db-cluster-identifier option. You can optionally specify an Availability Zone for the Aurora Replica using the --availability-zone parameter, as shown in the following examples.

For example, the following command creates a new MySQL 5.7–compatible Aurora Replica named sample-instance-us-west-2a.

For Linux, OS X, or Unix:

aws rds create-db-instance --db-instance-identifier sample-instance-us-west-2a \ --db-cluster-identifier sample-cluster --engine aurora-mysql --db-instance-class db.r4.large \ --availability-zone us-west-2a

For Windows:

aws rds create-db-instance --db-instance-identifier sample-instance-us-west-2a ^ --db-cluster-identifier sample-cluster --engine aurora-mysql --db-instance-class db.r4.large ^ --availability-zone us-west-2a

The following command creates a new MySQL 5.6–compatible Aurora Replica named sample-instance-us-west-2a.

For Linux, OS X, or Unix:

aws rds create-db-instance --db-instance-identifier sample-instance-us-west-2a \ --db-cluster-identifier sample-cluster --engine aurora --db-instance-class db.r4.large \ --availability-zone us-west-2a

For Windows:

aws rds create-db-instance --db-instance-identifier sample-instance-us-west-2a ^ --db-cluster-identifier sample-cluster --engine aurora --db-instance-class db.r4.large ^ --availability-zone us-west-2a
API

To create an Aurora Replica in your DB cluster, call the CreateDBInstance action. Include the name of the DB cluster as the DBClusterIdentifier parameter. You can optionally specify an Availability Zone for the Aurora Replica using the AvailabilityZone parameter.