Amazon Aurora MySQL

Amazon Aurora is a drop-in replacement for MySQL that combines the performance and availability of traditional enterprise databases with the simplicity and cost-effectiveness of open source databases. Amazon Aurora is fully managed by Amazon Relational Database Service (RDS), which automates time-consuming administration tasks like hardware provisioning, database setup, patching, and backups.

You can ingest data from your Amazon Aurora MySQL database using Hevo Pipelines and replicate it to a Destination of your choice.

Prerequisites


Perform the following steps to configure your Amazon Aurora MySQL Source:

Create a Read Replica (Optional)

To use an existing read-replica or connect Hevo to your master database, skip to Set up MySQL Binary Logs for Replication section.

An Aurora database cluster with single-master replication has one primary database instance and up to 15 Aurora Replicas. To create a read-replica:

  1. Open the Amazon RDS console.

  2. In the left navigation pane, click Databases (or Instances if you are using an older version).

  3. In the Databases section on the right, click the DB identifier of the Aurora MySQL instance you want to replicate. For example, database-1, in the image below.

    Note : The Role column denotes whether your Aurora MySQL is a Provisioned one Serverless. If you’re using a Serverless DB cluster, you can skip creating a replica.

    Select DB Identifier

  4. In the Actions drop-down, click Add reader.

    Add reader

  5. In the Settings panel, specify the following:

    • DB instance identifier: The replica instance you are creating.

    • Aurora replica source: The master or primary database instance being replicated.

    Select replica source

  6. Under Connectivity, Public access, select Publicly accessible to allow connection to the database instance via a public IP address, such as Hevo’s IP address.

    Select publicly accessible

  7. Scroll down and click Create Replica.

You can now see the Read Replica instance in the Databases page. Use this replica for any further steps and processes.

View read replica


Set up MySQL Binary Logs for Replication

A binary log is a collection of log files that records information about data modifications and data object modifications made on a MySQL server instance. Typically binary logs are used for data replication and data recovery.

Hevo supports data ingestion for replication from MySQL servers via binary logs (BinLog). For this, binary logging must be enabled on your MySQL instance.

To enable binary logging for an Aurora DB cluster, follow these steps:

  1. Open the Amazon RDS console.

  2. In the left navigation pane, select Parameter groups.

    Select parameter groups

  3. Select the instance with Type as DB cluster parameter group.

    Note: If you are using the default Aurora DB cluster parameter group, then create a new DB cluster parameter group. Type, choose DB cluster parameter group.

  4. Click Edit Parameters.

    Edit parameters

  5. Search for the parameter Name binlog_format, and activate binary log replication by setting the Values to ROW.

  6. Click Save changes.

    Specify binlog format

This confirms that binary logging is now enabled for your Aurora MySQL instance.

Read BinLog Replication and BinLog Alerts.

The replication reference guide on MySQL’s documentation portal provides a complete reference of the options available for replication and binary logging.


Whitelist Hevo’s IP Addresses

You need to whitelist the Hevo IP address for your region to enable Hevo to connect to your Amazon Aurora MySQL database. To do this:

  1. Open the Amazon RDS console.

  2. In the left navigation pane, click Databases (or Instances if you’re using an older version)

  3. In the Databases section on the right, click the DB identifier of the Amazon Aurora instance to configure a security group on.

  4. In the Connectivity & security tab, click the link text under Security, VPC security groups.

  5. In the Actions drop-down on the top right, select Edit inbound rules.

  6. In the Edit inbound rules page:

    1. Click Add rule.

    2. Add a new rule either with 0.0.0.0/0 or Hevo’s IP address for your region to give access to the Amazon Aurora MySQL instance.

    3. Click Save rules.

      Add rule to whitelist Hevo


Create a Database User and Grant Privileges

Perform the following steps to grant SELECT and REPLICATION privileges to the database user:

  1. Log into your Amazon Aurora MySQL database instance as a root user.

  2. Run the following command to create a new database user. For example, we are using hevo as user name:

    CREATE USER hevo@'%' IDENTIFIED BY '<password>';
    
  3. Run the following command to grant SELECT and REPLICATION privileges to the new database user:

    GRANT SELECT, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO hevo;
    
  4. Grant privileges to the database user to read BinLog settings, if Pipeline mode is Binlog:

    GRANT SELECT ON mysql.rds_configuration to hevo;
    

Retrieve the Hostname and Port Number (Optional)

Note: The Amazon Aurora MySQL hostnames start with your database name and end with rds.amazonaws.com.

For example:
Host: mysql-rds-replica-1.xxxxxxxxx.rds.amazonaws.com
Port: 3306

  1. In the left navigation pane of the Amazon RDS console, click Databases (or Instances if you are using an older version).

  2. In the Databases section on the right, click the DB identifier of the Amazon Aurora MySQL instance.

    Select read replica instance

  3. Click the Connectivity & security tab, and copy the values under Endpoint and Port as the hostname and port number. You will specify these while creating your Hevo Pipeline.

    Copy endpoint & port


Limitations

  • Hevo does not fetch Views from the MySQL database automatically.

    As a workaround, you can create individual Pipelines in Custom SQL mode to fetch each View. However, some limitations may arise based on the type of data synchronization, the query mode, or the number of Events. Contact Hevo Support for more details.

Last updated on 29 Mar 2021