{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/data-pipelines/prepare-dbs/aws-aurora-rds/aws-aur-pgsql",
  "title": "Prepare AWS Aurora PostgreSQL/AWS RDS PostgreSQL for RDI",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/data-pipelines/prepare-dbs/aws-aurora-rds/aws-aur-pgsql/",
  "summary": "Prepare AWS Aurora PostgreSQL databases to work with RDI",
  "content": "\nFollow the steps in the sections below to prepare an\n[AWS Aurora PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_GettingStartedAurora.CreatingConnecting.AuroraPostgreSQL.html) or [AWS RDS PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html)\ndatabase to work with RDI.\n\n```checklist {id=\"aurorapostgresql\" nointeractive=\"true\" }\n- [ ] [Create and apply parameter group](#create-and-apply-parameter-group)\n- [ ] [Create Debezium user](#create-debezium-user)\n```\n\n## Create and apply parameter group\n\nRDI requires some changes to database parameters. On AWS RDS and AWS Aurora, you change these parameters via a parameter group.\n\n```checklist {id=\"aurorapostgresql-param-group\" nointeractive=\"true\" }\n- [ ] [Create/modify a parameter group](#create-a-parameter-group)\n- [ ] [Apply the parameter group](#apply-the-parameter-group)\n- [ ] [Apply the parameter group to the database](#apply-the-parameter-group-to-the-database)\n- [ ] [Reboot the database instance](#reboot-the-database-instance)\n```\n\n1. \u003ca id=\"create-a-parameter-group\"\u003e\u003c/a\u003e\n    In the [Relational Database Service (RDS) console](https://console.aws.amazon.com/rds/), navigate to **Parameter groups**.\n    \n    If you have no existing parameter group,\n    [create a new parameter group](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.CreatingCluster.html)\n    with the following settings:\n\n    | Name | Value |\n    | :-- | :-- |\n    | **Parameter group name**  | Enter a suitable parameter group name, like `rdi-aurora-pg` or `rdi-rds-pg` |\n    | **Description**  | (Optional) Enter a description for the parameter group |\n    | **Engine Type**  | Choose **Aurora PostgreSQL** for Aurora PostgreSQL or **PostgreSQL** for AWS RDS PostgreSQL. |\n    | **Parameter group family**  | Choose **aurora-postgresql15** for Aurora PostgreSQL or **postgresql13** for AWS RDS PostgreSQL. |\n\n    Select **Create** to create the parameter group.\n\n    If you *do* have an existing parameter group, select it and then either:\n\n    -   Select **Edit** from **Parameter group actions** to \n        [modify the parameter group](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.ModifyingCluster.html)\n        with the settings shown in the table above.\n    -   Select **Copy** from **Parameter group actions** to\n        [copy the existing parameter group](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.CopyingCluster.html)\n        and then modify the copy with the settings shown in the table above.\n\n1. \u003ca id=\"apply-the-parameter-group\"\u003e\u003c/a\u003e\n    Ensure that the parameter group you have just created or modified is selected\n    and then select **Edit**. Change the following parameter:\n\n    | Name | Value |\n    | :-- | :-- |\n    | `rds.logical_replication`  | `1` |\n\n    Select **Save Changes** to apply the changes to the parameter group.\n\n1. \u003ca id=\"apply-the-parameter-group-to-the-database\"\u003e\u003c/a\u003e\n    Go back to your database on the RDS console, select **Modify** and then scroll down to **Additional Configuration**. Set the **DB Cluster Parameter Group** to the group you just created. \n\n    Select **Save changes** to apply the parameter group to your database.\n\n1. \u003ca id=\"reboot-the-database-instance\"\u003e\u003c/a\u003e\n    Reboot your database instance. See [Rebooting a DB instance within an Aurora cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-reboot-db-instance.html) or [Rebooting a DB instance (RDS)](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RebootInstance.html) for more information.\n\n## Create Debezium user\n\nThe Debezium connector needs a user account to connect to PostgreSQL. This\nuser must have appropriate permissions on all databases where you want Debezium\nto capture changes.\n\n```checklist {id=\"aurorapostgresql-create-debezium-user\" nointeractive=\"true\" }\n- [ ] [Connect to PostgreSQL as the `postgres` user](#connect-to-postgresql-as-the-postgres-user)\n- [ ] [Grant the user the necessary replication permissions](#grant-the-user-the-necessary-replication-permissions)\n- [ ] [Grant the user access to the database](#grant-the-user-access-to-the-database)\n```\n\n1. \u003ca id=\"connect-to-postgresql-as-the-postgres-user\"\u003e\u003c/a\u003e\n    Connect to PostgreSQL as the `postgres` user and create a new user for the connector:\n\n    ```sql\n    CREATE ROLE \u003cusername\u003e WITH LOGIN PASSWORD '\u003cpassword\u003e' VALID UNTIL 'infinity';\n    ```\n\n    Replace `\u003cusername\u003e` and `\u003cpassword\u003e` with a username and password for the new user.\n\n1. \u003ca id=\"grant-the-user-the-necessary-replication-permissions\"\u003e\u003c/a\u003e\n    Grant the user the necessary replication permissions:\n\n    ```sql\n    GRANT rds_replication TO \u003cusername\u003e;\n    ```\n\n    Replace `\u003cusername\u003e` with the username of the Debezium user.\n\n1. \u003ca id=\"grant-the-user-access-to-the-database\"\u003e\u003c/a\u003e\n    Connect to your database as the `postgres` user and grant the new user access to one or more schemas in the database:\n\n    ```sql\n    GRANT SELECT ON ALL TABLES IN SCHEMA \u003cschema\u003e TO \u003cusername\u003e;\n    ```\n\n    Replace `\u003cusername\u003e` with the username of the Debezium user and `\u003cschema\u003e` with the schema name.\n\n1. \u003ca id=\"allow-connection-from-debezium-user\"\u003e\u003c/a\u003e\n    Connect to your database as the `postgres` user and allow the Debezium user to connect to the database:\n\n    ```sql\n    GRANT CONNECT ON DATABASE \u003cdatabase\u003e TO \u003cusername\u003e;\n    ```\n\n    Replace `\u003cdatabase\u003e` with the name of the database and `\u003cusername\u003e` with the username of the Debezium user.\n\n1. \u003ca id=\"grant-usage-to-schema\"\u003e\u003c/a\u003e\n    Connect to your database as the `postgres` user and grant the new user usage on the schema:\n\n    ```sql\n    GRANT USAGE ON SCHEMA \u003cschema\u003e TO \u003cusername\u003e;\n    ```\n\n    Replace `\u003cschema\u003e` with the schema name and `\u003cusername\u003e` with the username of the Debezium user.\n\n1. \u003ca id=\"grant-privileges-for-the-future\"\u003e\u003c/a\u003e\n    For example, your database setup might use three roles:\n\n    - `postgres`: the administrator setting up RDI.\n    - `app_migrations`: the role that creates application tables.\n    - `debezium`: the user RDI uses to read those tables.\n\n    These names are examples. Use your existing roles.\n\n    The administrator can grant Debezium access to existing tables, so the initial snapshot works. Later, `app_migrations` creates a new table. Defaults set for `postgres` do not give Debezium access to that table, so reading it can fail.\n\n    Set the defaults for the role that creates the tables. In this example, use `app_migrations` as `\u003ctable_creator\u003e` and `debezium` as the Debezium user.\n\n    Connect as the table creator and grant the Debezium user access to future tables:\n\n    ```sql\n    ALTER DEFAULT PRIVILEGES FOR ROLE \u003ctable_creator\u003e IN SCHEMA \u003cschema\u003e\n        GRANT SELECT ON TABLES TO \u003cusername\u003e;\n    ```\n\n    Replace `\u003ctable_creator\u003e` with the role that runs `CREATE TABLE`, often your migration role. Replace `\u003cschema\u003e` with the schema name and `\u003cusername\u003e` with the Debezium user. An administrator with permission to change that role's defaults can also run this command.\n\n    Repeat for each table creator and schema. This command covers future tables only. Keep the grants for existing tables.\n\n1. \u003ca id=\"create-publication\"\u003e\u003c/a\u003e\n    Connect to your database as the `postgres` user and create a publication containing\n    only the tables RDI should capture. First [check their replica identities](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/postgresql#check-replica-identity-and-choose-a-publication-mode).\n    Replace the example table names with your selected tables:\n\n    ```sql\n    CREATE PUBLICATION rdi_publication\n    FOR TABLE public.customers, public.orders;\n    ```\n\n    Set `publication.name` to `rdi_publication` and `publication.autocreate.mode` to\n    `disabled` under the source's advanced source settings. On Redis Cloud, enter these\n    values under [**Collector properties**](https://redis.io/docs/latest/operate/rc/rdi/setup#postgresql-publications).\n    Update the publication's table list when you change the tables RDI captures.\n\n    Alternatively, let RDI manage the publication with `publication.autocreate.mode: filtered`\n    after granting the [required ownership and creation permissions](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/postgresql#set-privileges-for-debezium-to-create-postgresql-publications-with-pgoutput).\n\n    Use `FOR ALL TABLES` only when you intend to publish every current and future table.\n    An application `UPDATE` or `DELETE` on any published table without replica identity can\n    fail, even if RDI does not capture that table. If you already created an all-tables\n    publication, follow [Replace an existing all-tables publication](https://redis.io/docs/latest/integrate/redis-data-integration/data-pipelines/prepare-dbs/postgresql#replace-an-existing-all-tables-publication).\n",
  "tags": ["docs","integrate","rs","rc","rdi"],
  "last_updated": "2026-10-21T09:46:20-07:00"
}
