Reference
AWS RDS Postgres

Configuring AWS RDS Postgres for Readyset

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

Before each step listed below, you'll need to:

  • Log in to your AWS account.
  • 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.

Instructions

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, it's easiest if you install Readyset in the same VPC as your database. If Readyset is located in another VPC, you can set up VPC peering; otherwise, the database will have to be publicly accessible.

  1. Within RDS under the Resources section, select DB instances.

AWS Resources

  1. Choose the instance you want to make publicly accessible.
  2. Click the Modify button in the upper right corner.
  3. In the Connectivity section, click on Additional configurations.

AWS Connectivity

  1. Under Public access, choose Publicly accessible.

AWS 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

  1. Under the Resources section, select Parameter groups (opens in a new tab) in the upper right.

AWS Resources

  1. If you already have Parameter groups, you'll want to modify an existing group. If you don't have an existing parameter group, you'll need to create a new one following these steps (opens in a new tab) first.

    Select the Parameter group you want to modify and then click Edit in the upper right corner.

AWS Parameter Group

  1. Search for rds.logical_replication and change the value from 0 to 1.
  2. If you used an existing Parameter group, skip to step 5. If you created a new Parameter group, you will need to associate your group with this instance. To do that, go to your RDS dashboard, click your instance name and select Modify in the upper right corner. 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.

AWS Parameter Groups 2

Click on Continue at the bottom of the page. Select when you want to apply the change and click Modify DB instance. 5. To check that this worked, you can return to Resources and select Parameter groups (see step 3). Select the Parameter group you edited and search for rds.logical_replication under Parameters:

AWS Parameter Groups 3

If you're not seeing a value of 1, you may need to reboot your instance. To do that go to your instance and click on the Actions menu in the upper right corner and select Reboot.

AWS Example

3. Enable superuser permissions

When you initially set up your RDS instance, you created an admin user and password (opens in a new tab). If you use this admin user account when configuring your database for Readyset, you will not need to enable superuser permissions

However, if you are using a different database user than the default admin, you will need to enable superuser permissions. To do that, execute the following:

UPDATE pg_user SET usesuper=true where usename = CURRENT_USER;