Setting up Amazon RDS for PostgreSQL for CDC (Change data capture)
You can use the AWS master user account for the PostgreSQL database instance as the user for the Amazon RDS for PostgreSQL source endpoint. The master user account has the required roles that allow it to set up Change Data Capture (CDC).
If you prefer not to use the master user account, the account you wish to use must have the rds_superuser role and the rds_replication role. The rds_replication role grants permissions to manage logical slots and to stream data using logical slots.
To enable logical replication for an Amazon RDS PostgreSQL database instance:
- Create a new parameter group with the following configuration:
- Set the rds.logical_replication parameter in the database parameter group to 1.
- max_wal_senders – The number of tasks that can run in parallel.
- max_replication_slots – Every connection (i.e. task) creates a new slot; this parameter configures the amount of simultaneous connections that can be established to the database.
-
Link the Amazon RDS instance to the parameter group.