Creating a service account

CREATE USER artie_transfer WITH PASSWORD 'password';

-- (optional) If the schema is not public, you will need this additional line
GRANT USAGE ON SCHEMA schema_name TO artie_transfer;

-- Grant read-only access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name
      GRANT SELECT ON TABLES TO artie_transfer;

-- Grant access to existing tables
GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO artie_transfer;

-- The replication role does not have enough permissions to create publications.
-- So you will need to create this as well.
CREATE PUBLICATION dbz_publication FOR ALL TABLES;

-- Grant replication role
GRANT rds_replication to artie_transfer;

Turning on logical replication

rds.logical_replication is a static parameter which requires a database reboot to take effect.

  1. Select your database instance
  2. Go into Configuration and find your DB instance parameter group
  3. If you don’t have one, go to Parameter groups and click Create parameter group

  1. Find and change rds.logical_replication and set it to 1

  1. Associate the parameter group with your database instance