Skip to main content

Amazon RDS

This guide walks through adding an Amazon RDS Postgres instance as a Resource.

The following topics are covered:

If using Logical Replication method:

  1. If necessary, enable Logical Replication (reboot required).
  2. Allow Access

If using the Polling method:

  1. Create Read Replica (optional)
  2. Allow Access

Allow Access#

If your instance is in a VPC, you must configure the two mechanisms that control access:

If your instance is not in a VPC, you only need to configure Security Groups.

Security Groups#

To allow access to your PostgreSQL database from Meroxa IPs, follow these steps:

  1. Navigate to Amazon RDS.
  2. Select the Database you would like to add to Meroxa.
  3. In the "Connectivity & security" section, select your Security Group:

  1. In the Security Group configuration, select "Edit inbound rules":

  1. Add a new Rule:
  • Set "Protocol" to TCP
  • Set "Port" to the port of your database. It is 5432 by default.
  • Set the "Source" to the Meroxa IPs:

Network ACLs#

You only need to update this if your database is within a VPC.

To allow access to your PostgreSQL database from Meroxa IPs, follow these steps:

  1. Navigate to Amazon RDS.
  2. Select the Database you would like to create a replica of.
  3. In the "Connectivity & security" section, select your VPC:
  4. In the VPC Settings, select your VPC's "Main Network ACL":
  5. Update the Inbound and Outbound Rule of the Network ACL

5a. If your inbound and outbound rules contain, ALL - 0.0.0.0/0 - ALLOW, you can move to #6. 5b. If your inbound and outbound rules does not contain, ALL - 0.0.0.0/0 - ALLOW, update the Source to allow Meroxa IPs both inbound and outbound. 6. Now you're ready to Add the Postgres Resource.

Enable Logical Replication#

You only need to follow these steps if you're using Logical Replication.

To enable Logical Replication to your RDS instance, follow these steps:

  1. Note: These instructions do require a reboot of the RDS instance and read replicas are not supported.
  2. Navigate to Amazon RDS.
  3. Select "Parameter groups", and "Create parameter group".

2. Update rds.logical_replication to 1.

3. Save the new Parameter group. 4. Navigate to Amazon RDS 5. Select your Database and select "Modify". 6. Modify the "DB parameter group" to your newly created group. 7. After reboot, your PostgreSQL instance has Logical Replication enabled.

Create Read Replica#

Connecting to a Read Replica

You can create a read-only replica to allow read-only access to Postgres. However, Logical Replication is not supported using this method.

If needed, You can create a read-only replica to allow read-only access to Postgres.

Here are the steps:

  1. Navigate to Amazon RDS.
  2. Select the Database you would like to create a replica of.
  3. Select "Actions" and "Create read replica".

  1. In the "Create read replica" form, give your replica a name and select "Yes" for Publicly accessible. All other defaults can be changed if desired.

  1. Select "Create instance".
  2. Finally, Allow Access to your newly created read replica.