Reference
AWS Aurora Postgres

Configuring AWS Aurora Postgres for Readyset

If you're using AWS Aurora Postgres, you'll need to make a few configuration changes via the AWS console to enable Readyset to properly replicate tables.

Instructions

Note: Readyset only needs access to the write node of any Aurora cluster.

1. Establish a network connection

Note: these directions assume you are using Readyset in a different VPC than the upstream database you're connecting to. If Readyset is within the same VPC as your database, you can ignore this step.

To make sure Readyset can connect with your database, the database will have to be publicly accessible.

  1. Log in to your AWS account.
  2. Click on RDS, which can be found by searching for it in the search bar, under the Services menu, or in your Recently Visited area. Within RDS under the Resources section, select DB instances.
  3. Choose the instance you want to use.
  4. Click the Modify button in the upper right corner.
  5. In the Connectivity section, click on Additional configurations.

Connectivity 1

  1. Under Public access, choose Publicly accessible.

Connectivity 2

  1. Click on Continue at the bottom of the page.
  2. Select when you want to apply the change and click Modify DB instance.

2. Turn on logical replication

Note: More information on logical replication and Aurora can be found in AWS documentation (opens in a new tab).
  1. Log in to your AWS account.
  2. Click on RDS, which can be found by searching for it in the search bar, under the Services menu, or in your Recently Visited area.
  3. Under the Resources section, select Parameter groups (opens in a new tab) in the upper right.
Note: To use Readyset with Aurora, you must create a new parameter group.
  1. Select Create Parameter group from the upper right corner.
  2. Choose Aurora postgres 15 from the dropdown menu.
  3. Under Group Name select DB Cluster Parameter Group from the dropdown. For Readyset to work this must be at the cluster-level.

AWS Example

  1. Choose a name and add an optional description and then hit the Create button.
  2. Return to Parameter groups and select the name of your newly-created group.
  3. Select Edit from the top right corner.
  4. Search for rds.logical_replication and change the value from 0 to 1.
  5. Go back to the dashboard and select your Aurora write node instance and then select Edit in the top right corner.
  6. Open Additional configurations at the bottom of the page. Under Database options there's a dropdown to select a DB parameter group. Select the appropriate Parameter group for the DB cluster parameter group.

AWS Parameter Groups 2

  1. To check that this worked, run the following command:
SELECT name,setting FROM pg_settings WHERE name = 'rds.logical_replication';

If you're not seeing:

          name           | setting
-------------------------+---------
 rds.logical_replication | on

You may need to reboot your instance. To do that go to your write node instance and click on the Actions menu in the upper right corner and select Reboot.

Reboot AWS RDS

3. Enable superuser permissions

If you are using RDS and Readyset with the same user account (opens in a new tab) you used to set up the database, permissions do not need to be enabled.

If you need to add a new user account or access Readyset with a different one, you'll need to enable superuser permissions. To do that, enter the following in the psql command line interface:

UPDATE pg_user SET usesuper=true where usename = CURRENT_USER;