{
  "id": "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",
  "tags": [
    "docs",
    "integrate",
    "rs",
    "rc",
    "rdi"
  ],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "page_type": "content",
  "content_hash": "434bf9ab64ed79a90c73bd8a06808ef99262eb103d9cc82427306430a1b27b91",
  "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    Connect to your database as the `postgres` user and grant the new user the necessary privileges for the future:\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=\"create-publication\"></a>\n    Connect to your database as the `postgres` user and create a publication for the database:\n\n    [code example]"
    }
  ],
  "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 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 dbz_publication FOR ALL TABLES;",
      "section_id": "create-debezium-user"
    }
  ]
}
