PostgreSQL
Amazon Aurora and RDS
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.
- Select your database instance
- Go into
Configuration
and find yourDB instance parameter group
- If you don’t have one, go to
Parameter groups
and clickCreate parameter group
- Find and change
rds.logical_replication
and set it to1
- Associate the parameter group with your database instance
Was this page helpful?