{
  "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/data-pipelines/prepare-dbs/aws-aurora-rds/aws-aur-pgsql/",
  "summary": "Prepare AWS Aurora PostgreSQL databases to work with RDI",
  "aliases": [
    "/integrate/redis-data-integration/ingest/data-pipelines/prepare-dbs/aws-aur-pgsql/",
    "/integrate/redis-data-integration/ingest/data-pipelines/prepare-dbs/aws-aurora-rds/aws-aur-pgsql/",
    "/integrate/redis-data-integration/data-pipelines/prepare-dbs/aws-aur-pgsql/"
  ],
  "tags": [
    "docs",
    "integrate",
    "rs",
    "rc",
    "rdi"
  ],
  "last_updated": "2026-10-19T20:38:06+03:00",
  "page_type": "content",
  "content_hash": "69984067ed335cf7eaec8c249871f788a8f8be75041ddd892126b465af23a52c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Follow 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[code example]"
    },
    {
      "id": "create-and-apply-parameter-group",
      "title": "Create and apply parameter group",
      "role": "content",
      "text": "RDI requires some changes to database parameters. On AWS RDS and AWS Aurora, you change these parameters via a parameter group.\n\n[code example]\n\n1. <a id=\"create-a-parameter-group\"></a>\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. <a id=\"apply-the-parameter-group\"></a>\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. <a id=\"apply-the-parameter-group-to-the-database\"></a>\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. <a id=\"reboot-the-database-instance\"></a>\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."
    },
    {
      "id": "create-debezium-user",
      "title": "Create Debezium user",
      "role": "content",
      "text": "The 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[code example]\n\n1. <a id=\"connect-to-postgresql-as-the-postgres-user\"></a>\n    Connect to PostgreSQL as the `postgres` user and create a new user for the connector:\n\n    [code example]\n\n    Replace `<username>` and `<password>` with a username and password for the new user.\n\n1. <a id=\"grant-the-user-the-necessary-replication-permissions\"></a>\n    Grant the user the necessary replication permissions:\n\n    [code example]\n\n    Replace `<username>` with the username of the Debezium user.\n\n1. <a id=\"grant-the-user-access-to-the-database\"></a>\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    [code example]\n\n    Replace `<username>` with the username of the Debezium user and `<schema>` with the schema name.\n\n1. <a id=\"allow-connection-from-debezium-user\"></a>\n    Connect to your database as the `postgres` user and allow the Debezium user to connect to the database:\n\n    [code example]\n\n    Replace `<database>` with the name of the database and `<username>` with the username of the Debezium user.\n\n1. <a id=\"grant-usage-to-schema\"></a>\n    Connect to your database as the `postgres` user and grant the new user usage on the schema:\n\n    [code example]\n\n    Replace `<schema>` with the schema name and `<username>` with the username of the Debezium user.\n\n1. <a id=\"grant-privileges-for-the-future\"></a>\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 `<table_creator>` and `debezium` as the Debezium user.\n\n    Connect as the table creator and grant the Debezium user access to future tables:\n\n    [code example]\n\n    Replace `<table_creator>` with the role that runs `CREATE TABLE`, often your migration role. Replace `<schema>` with the schema name and `<username>` 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. <a id=\"create-publication\"></a>\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    [code example]\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)."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "checklist {id=\"aurorapostgresql\" nointeractive=\"true\" }",
      "code": "- [ ] [Create and apply parameter group](#create-and-apply-parameter-group)\n- [ ] [Create Debezium user](#create-debezium-user)",
      "section_id": "overview"
    },
    {
      "id": "create-and-apply-parameter-group-ex0",
      "language": "checklist {id=\"aurorapostgresql-param-group\" nointeractive=\"true\" }",
      "code": "- [ ] [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)",
      "section_id": "create-and-apply-parameter-group"
    },
    {
      "id": "create-debezium-user-ex0",
      "language": "checklist {id=\"aurorapostgresql-create-debezium-user\" nointeractive=\"true\" }",
      "code": "- [ ] [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)",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex1",
      "language": "sql",
      "code": "CREATE ROLE <username> WITH LOGIN PASSWORD '<password>' VALID UNTIL 'infinity';",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex2",
      "language": "sql",
      "code": "GRANT rds_replication TO <username>;",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex3",
      "language": "sql",
      "code": "GRANT SELECT ON ALL TABLES IN SCHEMA <schema> TO <username>;",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex4",
      "language": "sql",
      "code": "GRANT CONNECT ON DATABASE <database> TO <username>;",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex5",
      "language": "sql",
      "code": "GRANT USAGE ON SCHEMA <schema> TO <username>;",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex6",
      "language": "sql",
      "code": "ALTER DEFAULT PRIVILEGES FOR ROLE <table_creator> IN SCHEMA <schema>\n        GRANT SELECT ON TABLES TO <username>;",
      "section_id": "create-debezium-user"
    },
    {
      "id": "create-debezium-user-ex7",
      "language": "sql",
      "code": "CREATE PUBLICATION rdi_publication\n    FOR TABLE public.customers, public.orders;",
      "section_id": "create-debezium-user"
    }
  ]
}
