Cloud Databases & Managed Kafka

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

Most legacy databases that are migrated today do not run on a server that the migration team controls. The legacy Bookshop Oracle schema may already live on Amazon RDS for Oracle, the new PostgreSQL database will very likely be Amazon Aurora, Cloud SQL or Azure Database for PostgreSQL, and the Kafka cluster may be Amazon MSK or Confluent Cloud. Debezium works with all of them, but the preparation steps from the connector pages assume things that a managed service does not give you: a SYSDBA or superuser login, ALTER SYSTEM, a configuration file, access to the operating system, and control over how long transaction logs are kept.

This page translates each database preparation step into the mechanism that the cloud provider offers instead (parameter groups, database flags, server parameters and vendor stored procedures), explains which provider defaults break a long migration (short log retention, slots lost on failover, slots dropped automatically when storage runs low) and compares the places where the connectors themselves can run: Amazon MSK Connect, Confluent Cloud, a self-managed Kafka Connect cluster on Kubernetes, and Debezium Server with a cloud-native sink. It does not repeat how to create the cloud resources. Those steps are on the cloud pages that it links, such as Amazon RDS, Amazon Aurora, Cloud SQL, PostgreSQL and MySQL on Azure and Azure SQL.

Checked on 2026-11-09 against Debezium 3.7.1.Final and against the AWS, Google Cloud, Microsoft and Confluent documentation pages listed in the references on the same date. Managed services are described by their capabilities only, with no prices, and their limits change often, so check the linked page before you rely on a number. The configuration on this page is derived from the official documentation; it was not run against any cloud account.

What changes when the database is managed

Every Debezium source connector needs the same three things from the database: the change log must be switched on at the right level of detail, the log must be kept long enough for the connector to read it, and the connector user must have the privileges to read it. On a self-managed server you set these with ALTER SYSTEM, a configuration file or a SYSDBA session. On a managed service each of them moves somewhere else.

Need Self-managed server Managed service

Turn on the change log

wal_level=logical in postgresql.conf; log_bin and binlog_format=ROW in my.cnf; ALTER DATABASE ARCHIVELOG for Oracle

A parameter in a parameter group (RDS, Aurora), a database flag (Cloud SQL), a server parameter (Azure), or automated backups that the provider ties to the log (RDS for MySQL, RDS for Oracle)

Keep the log long enough

binlog_expire_logs_seconds, archive log deletion policy, replication slots

A vendor procedure (mysql.rds_set_configuration, rdsadmin.rdsadmin_util.set_configuration), a server parameter (Azure), and replication slots that the provider may drop or lose on failover

Grant privileges

GRANT ... TO as a superuser or SYSDBA

A provider role (rds_replication, cloudsqlsuperuser, azure_pg_admin) or a vendor procedure for grants on SYS objects (rdsadmin.rdsadmin_util.grant_sys_object)

Restart after a static change

Restart the service

Reboot the instance (RDS, Aurora writer) or restart the server (Azure); the provider may also restart it in the maintenance window

Reach the database

Any network path

Private networking (VPC, VPC peering, Private Service Connect, Private Link) between the Connect workers and the database, plus TLS and often IAM-based authentication

Two consequences matter more than the rest for a migration that runs for months:

  • The provider’s defaults are tuned for backups, not for an external log reader. RDS for MySQL keeps no binary log for external readers by default, Azure Database for MySQL deletes a binary log as soon as nothing internal needs it, and RDS for Oracle keeps archived redo logs on the instance only for the hours you set. A connector that is stopped for a weekend can come back to a log position that no longer exists. The recovery options are on Troubleshooting & Failure Recovery and Offsets, Restarts & Exactly-Once.

  • Failover is the provider’s decision. A Multi-AZ or high-availability failover promotes a standby. Whether a PostgreSQL replication slot survives that depends on the PostgreSQL version and on settings that you must turn on. The details are in each PostgreSQL section below.

The Bookshop pipeline, mapped to one possible cloud layout, looks like this:

flowchart LR subgraph aws["AWS account, one VPC"] ORA[("RDS for Oracle: BOOKSHOP")] subgraph connect["Kafka Connect: MSK Connect or Strimzi on EKS"] SRC["bookshop-oracle-source"] SINK["bookshop-pg-mirror-sink"] end MSK["Amazon MSK: legacy.BOOKSHOP.* topics"] PG[("Aurora PostgreSQL: bookshop")] APP["bookshop app on EKS: group bookshop-legacy-sync"] end SM["Secrets Manager"] ORA -- "LogMiner over JDBC" --> SRC SRC --> MSK MSK --> SINK MSK --> APP SINK -- "legacy_* mirror tables" --> PG APP -- "book, customer, purchase_order" --> PG SM -. "credentials via config provider" .-> connect

The same shape applies to Google Cloud (Cloud SQL, Managed Service for Apache Kafka, GKE) and to Azure (Azure SQL or Azure Database for PostgreSQL, Kafka Connect on AKS). The managed Kafka offerings are described on Amazon MSK, Google Cloud Managed Service for Apache Kafka and Azure Event Hubs.

Amazon RDS and Aurora PostgreSQL

On RDS for PostgreSQL and Aurora PostgreSQL you cannot set wal_level yourself. You set the static parameter rds.logical_replication to 1 in a custom parameter group, and RDS changes wal_level to logical (together with max_wal_senders, max_replication_slots and max_connections) when the instance restarts. The AWS documentation warns that the parameter increases WAL generation, so turn it on only on the database that the connector reads.

The difference between the two services is where the parameter lives:

  • RDS for PostgreSQL: a custom DB parameter group attached to the instance. Reboot the instance afterwards.

  • Aurora PostgreSQL: a custom DB cluster parameter group attached to the cluster. Reboot the writer instance. The connector must connect to the cluster’s writer endpoint, because logical replication slots exist on the writer only.

A default parameter group cannot be changed, so a database still on the default group needs a custom group first, as described in Amazon RDS — Parameter groups and option groups.

Turning on logical replication for an RDS for PostgreSQL instance with the AWS CLI
aws rds modify-db-parameter-group \
  --db-parameter-group-name bookshop-pg18 \
  --parameters "ParameterName=rds.logical_replication,ParameterValue=1,ApplyMethod=pending-reboot"

aws rds reboot-db-instance --db-instance-identifier bookshop-pg
Turning on logical replication for an Aurora PostgreSQL cluster with the AWS CLI
aws rds modify-db-cluster-parameter-group \
  --db-cluster-parameter-group-name bookshop-aurora-pg18 \
  --parameters "ParameterName=rds.logical_replication,ParameterValue=1,ApplyMethod=pending-reboot"

# Reboot the writer instance of the cluster
aws rds reboot-db-instance --db-instance-identifier bookshop-aurora-writer

For Aurora, the same AWS page also lists max_replication_slots, max_wal_senders, max_logical_replication_workers and max_worker_processes. The defaults are usually enough for one or two Debezium connectors. Raise them if the cluster already serves AWS DMS tasks or other logical replication subscribers, because every connector holds one slot and one WAL sender.

Verify the parameter and create the connector user

After the reboot, check the result as the master user. If wal_level is still replica, the reboot has not happened yet: a static parameter is applied at the next reboot, which may be the next maintenance window.

Checking logical replication and creating the replication user (RDS and Aurora PostgreSQL)
SHOW rds.logical_replication;   -- on
SHOW wal_level;                 -- logical

CREATE ROLE dbz_reverse WITH LOGIN PASSWORD 'change-me';
GRANT rds_replication TO dbz_reverse;

-- SELECT is needed for the initial snapshot of the captured tables
GRANT USAGE ON SCHEMA public TO dbz_reverse;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO dbz_reverse;

The rds_replication role is what the Debezium documentation asks for: it lets a user other than the master user manage logical slots and stream from them. Granting it requires the master user (which holds rds_superuser). The SELECT grants are needed only for the snapshot.

Connector settings that differ on RDS and Aurora

RDS and Aurora support the pgoutput plug-in that is built into PostgreSQL, and the Debezium documentation says to set plugin.name to pgoutput explicitly. The other cloud-specific decision is the publication. With the default publication.autocreate.mode=all_tables the connector tries CREATE PUBLICATION ... FOR ALL TABLES, which requires superuser privileges that an RDS user does not have. Either create the publication as the master user (or the table owner) before the connector starts and set disabled, as the cut-over page does, or use filtered, which creates a publication only for the tables in table.include.list but requires the connector role to own those tables.

In the Bookshop migration the PostgreSQL connector is the reverse-replication source bookshop-pg-source on the new database (see Cut-over & Reverse Replication). On Aurora its configuration differs from the local one in the following properties:

bookshop-pg-source on Aurora PostgreSQL (fragment)
{
  "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
  "database.hostname": "bookshop.cluster-example.eu-west-1.rds.amazonaws.com",
  "database.port": "5432",
  "database.user": "dbz_reverse",
  "database.password": "${secretsmanager:bookshop/cdc:password}",
  "database.dbname": "bookshop",
  "database.sslmode": "verify-full",
  "topic.prefix": "modern",
  "plugin.name": "pgoutput",
  "slot.name": "bookshop_reverse",
  "publication.name": "bookshop_reverse_pub",
  "publication.autocreate.mode": "disabled",
  "table.include.list": "public.book,public.book_author,public.author,public.debezium_heartbeat",
  "snapshot.mode": "no_data",
  "heartbeat.interval.ms": "10000",
  "heartbeat.action.query": "INSERT INTO public.debezium_heartbeat (id, ts) VALUES (1, now()) ON CONFLICT (id) DO UPDATE SET ts = EXCLUDED.ts"
}
  • database.hostname is the cluster (writer) endpoint, not an instance endpoint and not the reader endpoint.

  • database.sslmode=verify-full checks the RDS certificate. The JVM truststore of the Connect workers must contain the AWS RDS certificate bundle.

  • The password comes from a configuration provider. The ${secretsmanager:...} syntax depends on which provider you install. Configuration providers are explained on Installing Debezium.

  • heartbeat.action.query writes to a small heartbeat table (public.debezium_heartbeat, with an id primary key and a ts column, created beforehand). It must be in the publication (ALTER PUBLICATION bookshop_reverse_pub ADD TABLE public.debezium_heartbeat) and in table.include.list; consumers ignore its topic. On a managed instance this matters more than on a laptop: the WAL is shared by every database on the instance, including databases that the provider uses for its own housekeeping. If the captured tables are quiet, the slot’s confirmed position does not move and the WAL grows. The Debezium documentation describes this case and the heartbeat fix under WAL disk space consumption.

To log in with IAM database authentication instead of a password, the Debezium documentation names a connection factory and the AWS Advanced JDBC Wrapper, which must be on the connector’s class path:

IAM database authentication for the PostgreSQL connector on RDS (fragment)
{
  "database.user": "dbz_reverse",
  "database.connection.factory.class": "io.debezium.connector.postgresql.connection.PostgresAwsIamConnectionFactory"
}

The database user must also be set up for IAM authentication (GRANT rds_iam TO dbz_reverse) and the Connect workers need an IAM role that allows rds-db:connect. Both are described in Amazon RDS — IAM database authentication.

Slots, failover and storage

A logical replication slot keeps every WAL segment from its restart_lsn onwards. If the connector stops, the WAL keeps growing until the instance runs out of storage. The AWS documentation states this risk directly. Monitor it with a query and an alarm on free storage:

Retained WAL per replication slot
SELECT slot_name, plugin, active, confirmed_flush_lsn,
       pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) AS retained_wal
  FROM pg_replication_slots
 WHERE slot_type = 'logical';

From PostgreSQL 17, a slot can be created as a failover slot, which PostgreSQL synchronizes to a standby so that a connector can continue from the new primary after a failover. Debezium creates such a slot when slot.failover=true and the primary runs PostgreSQL 17 or later. Whether a managed service promotes a standby that has synchronized the slot is a property of that service, so test a failover in a rehearsal environment before relying on it. With PostgreSQL 16 or earlier, or without failover slots, a failover loses the slot. The connector then needs a new slot and a re-snapshot (or an incremental snapshot) of the tables, as described on PostgreSQL Connector.

Amazon RDS and Aurora MySQL

The MySQL connector needs the binary log in ROW format with a FULL row image, kept long enough to cover any connector downtime. On RDS for MySQL three settings produce that:

  1. Automated backups. The Debezium documentation is explicit: without automated backups the binary log is disabled, whatever the parameters say. The backup retention period must be greater than zero.

  2. Binlog format. binlog_format=ROW and binlog_row_image=FULL in a custom DB parameter group. On Aurora MySQL the binary log is turned on by setting binlog_format in a custom DB cluster parameter group and rebooting the writer.

  3. Binlog retention. RDS purges binary logs as soon as it can. For an external reader such as Debezium you set a retention with the mysql.rds_set_configuration procedure.

Binlog retention on RDS for MySQL
-- Keep binary logs for 72 hours (RDS for MySQL allows up to 168 hours, 7 days)
CALL mysql.rds_set_configuration('binlog retention hours', 72);

-- Check the current value
CALL mysql.rds_show_configuration;

The default is NULL, which for RDS for MySQL means that binary logs are not retained. 0 is not an accepted value, and the maximum for RDS for MySQL instances is 168 hours. The setting survives reboots and failovers. On a Multi-AZ DB cluster it can only be set on the writer. Retained logs use instance storage, so watch free storage after you raise it. Aurora MySQL uses the same procedure; check the Aurora documentation for its maximum.

The retention is the longest time the connector can be stopped and still resume. Choose it together with your on-call response time. snapshot.mode=when_needed would re-snapshot automatically when the position is gone, but it also hides the incident; for a migration, keep initial, let the connector fail and recover deliberately, as Troubleshooting & Failure Recovery explains (see also Initial Snapshots).

Two connector-side points are specific to hosted MySQL:

  • No global read lock. RDS and Aurora do not allow FLUSH TABLES WITH READ LOCK, so the connector falls back to table-level locks for the consistent snapshot. The connector user then needs the LOCK TABLES privilege in addition to the usual SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT.

  • GTIDs. RDS and Aurora support GTID-based replication. With GTIDs on, the connector can follow a promoted replica and use read-only incremental snapshots. See MySQL & MariaDB Connectors.

Connector user for RDS or Aurora MySQL
CREATE USER 'bookshop_cdc'@'%' IDENTIFIED BY 'change-me';
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, LOCK TABLES
  ON *.* TO 'bookshop_cdc'@'%';

Amazon RDS for Oracle

The legacy Bookshop database is Oracle, and RDS for Oracle is a common home for it. RDS does not allow a SYSDBA login or ALTER DATABASE, so the preparation steps from Oracle Connector are replaced by procedures in the rdsadmin packages. The full list of grants and the reasons for each one are on that page; this section covers only what is different.

Archive log mode and retention

RDS for Oracle generates archived redo logs only when automated backups are on (a backup retention period greater than zero), which puts the database in ARCHIVELOG mode. Check it first. If LOG_MODE is not ARCHIVELOG, the Debezium documentation suggests rebooting the instance after you turn on backups.

Archived logs are kept on the instance only for the number of hours set with rdsadmin.rdsadmin_util.set_configuration. Older logs are removed from the instance (RDS keeps copies outside the instance for point-in-time restore, but LogMiner cannot read those). The AWS documentation says that a COMMIT is required for the change to take effect.

Archive log mode and archived redo log retention on RDS for Oracle (run as the master user)
SELECT log_mode FROM v$database;   -- must be ARCHIVELOG

BEGIN
  rdsadmin.rdsadmin_util.set_configuration(
    name  => 'archivelog retention hours',
    value => '72');
END;
/
COMMIT;

SET SERVEROUTPUT ON
EXEC rdsadmin.rdsadmin_util.show_configuration;

The retained logs use the instance’s allocated storage. Before raising the retention, measure how much redo the legacy workload produces with the query that the AWS page gives:

Archived redo produced in the last 24 hours
SELECT SUM(blocks * block_size) AS bytes
  FROM v$archived_log
 WHERE first_time >= SYSDATE - (24/24)
   AND dest_id = 1;

The Debezium documentation’s own RDS example uses 24 hours. For a migration, choose a value that covers the longest outage you are willing to recover from without a new snapshot, and size storage for it. The connector property archive.log.hours is a different thing: it limits how far back the connector looks for archive logs, and it does not keep any log on the server.

Supplemental logging and redo size

Minimal supplemental logging at database level is added with rdsadmin.rdsadmin_util.alter_supplemental_logging. The procedure takes p_action ('ADD' or 'DROP') and an optional p_type ('ALL', 'FOREIGN KEY', 'PRIMARY KEY', 'UNIQUE' or 'PROCEDURAL'). Table-level supplemental logging is a normal ALTER TABLE that the master user (or the schema owner) can run, so the per-table (ALL) COLUMNS logging that Debezium needs for the before image is set exactly as on a self-managed database.

Supplemental logging on RDS for Oracle
-- Minimal supplemental logging at database level
BEGIN
  rdsadmin.rdsadmin_util.alter_supplemental_logging(p_action => 'ADD');
END;
/

-- All-column logging for each captured table (not for the whole database)
ALTER TABLE BOOKSHOP.BOOK ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER TABLE BOOKSHOP.AUTHOR ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER TABLE BOOKSHOP.CUSTOMER ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER TABLE BOOKSHOP.ORDERS ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER TABLE BOOKSHOP.ORDER_LINE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER TABLE BOOKSHOP.SUPPLIER_CATALOGUE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;

SELECT supplemental_log_data_min, supplemental_log_data_all FROM v$database;

p_type => 'ALL' would turn on all-column logging for every table in the database. It works, but it increases redo volume for tables the migration does not capture, which is why both the Debezium and the AWS documentation recommend applying it selectively.

An RDS for Oracle instance starts with four online redo logs of 128 MB each. LogMiner on a busy database with small redo logs switches logs often, and the Oracle connector page explains why that hurts. Add larger groups with rdsadmin.rdsadmin_util.add_logfile, then drop the small ones once they are INACTIVE:

Larger online redo logs on RDS for Oracle
EXEC rdsadmin.rdsadmin_util.add_logfile(p_size => '1G');
EXEC rdsadmin.rdsadmin_util.add_logfile(p_size => '1G');
EXEC rdsadmin.rdsadmin_util.add_logfile(p_size => '1G');
EXEC rdsadmin.rdsadmin_util.add_logfile(p_size => '1G');

SELECT group#, bytes / 1024 / 1024 AS mb, status FROM v$log;

-- Repeat switch_logfile until the old groups are INACTIVE, then drop them by group number
EXEC rdsadmin.rdsadmin_util.switch_logfile;
EXEC rdsadmin.rdsadmin_util.drop_logfile(grp => 1);

The connector user and grants on SYS objects

The grant list from Oracle Connector applies. Two differences:

  • Grants on SYS objects such as V_$DATABASE or DBMS_LOGMNR cannot be given with a plain GRANT by the master user. Use rdsadmin.rdsadmin_util.grant_sys_object. It can only pass on privileges that the master user holds with the grant option, and object and user names must be in upper case.

  • The user name depends on the RDS architecture. On a non-CDB instance the connector user is a local user (for example DBZUSER) and database.pdb.name is not set. On the multitenant (CDB) architecture follow the Debezium CDB instructions and the AWS documentation for creating users in a tenant database. The C##DBZUSER common user from the local lab assumes SYSDBA access to CDB$ROOT, which RDS does not give you.

Grants on SYS objects for the connector user on a non-CDB RDS for Oracle instance
CREATE USER DBZUSER IDENTIFIED BY "change-me"
  DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS;

GRANT CREATE SESSION TO DBZUSER;
GRANT SELECT_CATALOG_ROLE TO DBZUSER;
GRANT EXECUTE_CATALOG_ROLE TO DBZUSER;
GRANT SELECT ANY TRANSACTION TO DBZUSER;
GRANT LOGMINING TO DBZUSER;
GRANT CREATE TABLE TO DBZUSER;
GRANT CREATE SEQUENCE TO DBZUSER;
GRANT LOCK ANY TABLE TO DBZUSER;
GRANT FLASHBACK ANY TABLE TO DBZUSER;
GRANT SELECT ANY TABLE TO DBZUSER;

BEGIN
  FOR v IN (SELECT column_value AS obj FROM TABLE(sys.odcivarchar2list(
              'V_$DATABASE', 'V_$LOG', 'V_$LOG_HISTORY', 'V_$LOGMNR_LOGS',
              'V_$LOGMNR_CONTENTS', 'V_$LOGMNR_PARAMETERS', 'V_$LOGFILE',
              'V_$ARCHIVED_LOG', 'V_$ARCHIVE_DEST_STATUS', 'V_$TRANSACTION',
              'V_$MYSTAT', 'V_$STATNAME'))) LOOP
    rdsadmin.rdsadmin_util.grant_sys_object(
      p_obj_name  => v.obj,
      p_grantee   => 'DBZUSER',
      p_privilege => 'SELECT');
  END LOOP;

  rdsadmin.rdsadmin_util.grant_sys_object(p_obj_name => 'DBMS_LOGMNR',   p_grantee => 'DBZUSER', p_privilege => 'EXECUTE');
  rdsadmin.rdsadmin_util.grant_sys_object(p_obj_name => 'DBMS_LOGMNR_D', p_grantee => 'DBZUSER', p_privilege => 'EXECUTE');
END;
/

-- Incremental snapshots write their watermarks into the signal table
GRANT INSERT, DELETE ON BOOKSHOP.DEBEZIUM_SIGNAL TO DBZUSER;

The script combines the grant list from Debezium — Creating a user account for the connector with the RDS procedure. It was not run against RDS. If one of the plain GRANT statements fails with ORA-01031, the master user does not hold that privilege with the admin option, and the AWS page on master user privileges is the place to check. As on a self-managed database, SELECT ANY TABLE and FLASHBACK ANY TABLE can be narrowed to the captured BOOKSHOP tables. The last grant is not in the official list: without INSERT and DELETE on the signal table, incremental snapshots fail with ORA-41900 when the connector writes its watermarks (see Signaling & Notifications).

AWS also documents rdsadmin.rdsadmin_master_util.create_archivelog_dir and create_onlinelog_dir, which create directory objects so that external tools can read the log files directly. The Debezium LogMiner adapter does not read files through directory objects (LogMiner reads them inside the database), and the Debezium RDS instructions list only the retention and supplemental logging procedures. You do not need those directories for Debezium.

Connector properties for RDS for Oracle

The bookshop-oracle-source configuration from the Oracle connector page applies with these changes for a non-CDB instance. Use database.url so that the service name and TLS settings are explicit:

bookshop-oracle-source on RDS for Oracle (fragment, non-CDB)
{
  "database.url": "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bookshop-legacy.example.eu-west-1.rds.amazonaws.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))",
  "database.user": "DBZUSER",
  "database.password": "${secretsmanager:bookshop/oracle-cdc:password}",
  "database.dbname": "ORCL",
  "log.mining.strategy": "hybrid",
  "signal.data.collection": "ORCL.BOOKSHOP.DEBEZIUM_SIGNAL"
}

database.pdb.name is absent because there is no PDB. The signal data collection is then named <database>.<schema>.<table> with the non-CDB database name. Everything else (topic prefix, include list, heartbeat, schema history) is unchanged.

The connector user’s session runs LogMiner on the RDS instance, so LogMiner’s memory and CPU use count against the instance class. Watch the instance’s CPU and the connector’s MiningSessionUserGlobalAreaMemoryInBytes metric during the first snapshot and streaming days (see Monitoring, Logging & Tracing).

Google Cloud SQL for PostgreSQL

Cloud SQL exposes logical decoding through the database flag cloudsql.logical_decoding. Setting it to on changes wal_level to logical. Set it with the console or with gcloud sql instances patch. Be careful with the command: the Cloud SQL documentation states that --database-flags overwrites all flags previously set, so list every flag the instance already has, not only the new one.

Turning on logical decoding on Cloud SQL for PostgreSQL
# Lists the flags the instance has now
gcloud sql instances describe bookshop-pg --format="value(settings.databaseFlags)"

# Repeat every existing flag here, then add the new one
gcloud sql instances patch bookshop-pg \
  --database-flags=cloudsql.logical_decoding=on

The two Google pages disagree on whether a restart is needed: the flag table lists cloudsql.logical_decoding as not requiring one, while the logical replication page says that changing the flags it discusses requires a restart. Plan for a restart and verify the result with SHOW wal_level; afterwards.

The replication user needs the REPLICATION attribute and membership in cloudsqlsuperuser:

Replication user on Cloud SQL for PostgreSQL
SHOW wal_level;   -- logical

CREATE USER dbz_reverse WITH REPLICATION IN ROLE cloudsqlsuperuser LOGIN PASSWORD 'change-me';

-- or, for an existing user
ALTER USER dbz_reverse WITH REPLICATION;

Other points from the Cloud SQL page that affect a migration:

  • max_replication_slots and max_wal_senders default to 10, and their limits grow with the instance’s memory. Every Debezium connector uses one of each.

  • An unused slot holds WAL indefinitely and can fill the disk. Drop the slot of any connector you delete.

  • From PostgreSQL 16, Cloud SQL read replicas can act as publishers. A connector can then read from a replica instead of the primary, but the replica’s slot can be invalidated by vacuum on the primary.

  • Set plugin.name=pgoutput, as for RDS.

Connect the workers through private IP or the Cloud SQL Auth Proxy, as described in Cloud SQL — Cloud SQL Auth Proxy. When Kafka Connect runs on GKE, the proxy usually runs as a sidecar in the worker pod (see Cloud SQL — From GKE).

Azure Database for PostgreSQL flexible server

The Debezium PostgreSQL page still shows the commands for the retired Single Server deployment (az postgres server and the azure.replication_support parameter). Flexible server uses the standard PostgreSQL parameter wal_level instead. The Single Server retirement is covered in PostgreSQL and MySQL on Azure.

The Microsoft prerequisites for logical decoding on flexible server are: set wal_level to logical, raise max_worker_processes to at least 16, restart the server, and give the replication user the REPLICATION attribute.

Turning on logical decoding on Azure Database for PostgreSQL flexible server
az postgres flexible-server parameter set \
  --resource-group bookshop-rg --server-name bookshop-pg \
  --name wal_level --value logical

az postgres flexible-server parameter set \
  --resource-group bookshop-rg --server-name bookshop-pg \
  --name max_worker_processes --value 16

az postgres flexible-server restart \
  --resource-group bookshop-rg --name bookshop-pg
Replication user on Azure Database for PostgreSQL flexible server
SHOW wal_level;   -- logical

CREATE ROLE dbz_reverse WITH LOGIN REPLICATION PASSWORD 'change-me';
GRANT USAGE ON SCHEMA public TO dbz_reverse;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO dbz_reverse;

Microsoft’s page recommends separating the replication user from the admin account, as above. It also lists two behaviours that a migration must plan for:

  • Slots and high availability. On PostgreSQL 16 and earlier, logical replication slots are not preserved during an HA failover unless you install the pg_failover_slots extension and set hot_standby_feedback=on. On PostgreSQL 17 and later, native slot synchronization preserves slots that were created with the failover option, once sync_replication_slots and hot_standby_feedback are on. For Debezium that means setting slot.failover=true on the connector so that its slot is created with the failover option.

  • Automatic slot drop. The server switches to read-only when storage usage reaches 95 percent or less than 5 GiB remains. If the threshold is exceeded and a logical slot is not in use, the service may drop that slot automatically to free WAL. For Debezium this means a connector that is stopped for too long can lose its slot without any action from you. When it restarts, it cannot resume and needs a new snapshot. Alert on the Storage Used and Maximum Used Transaction IDs metrics, as Microsoft recommends.

Failover slot for the PostgreSQL connector on PostgreSQL 17 or later (fragment)
{
  "plugin.name": "pgoutput",
  "slot.name": "bookshop_reverse",
  "slot.failover": "true"
}

Verify it with SELECT slot_name, failover, synced FROM pg_replication_slots; on the primary.

Azure Database for MySQL flexible server

On Azure Database for MySQL flexible server the binary log is always on and always in ROW format, so the connector prerequisites are met without changes, except for retention. The server parameter binlog_expire_logs_seconds has a default of 0 on this service, which means a binary log is deleted as soon as nothing inside the service (backup or replica) still holds it. An external reader such as Debezium is not one of those holders. Set the parameter to a value that covers the connector’s longest expected outage:

Binlog retention on Azure Database for MySQL flexible server (three days)
az mysql flexible-server parameter set \
  --resource-group bookshop-rg --server-name bookshop-mysql \
  --name binlog_expire_logs_seconds --value 259200

Microsoft documents one exception: when the accelerated logs feature is enabled, binlog_expire_logs_seconds is ignored. Check whether the server uses accelerated logs before you rely on the parameter. The parameter commands for MySQL are described in PostgreSQL and MySQL on Azure.

Azure SQL Database

The Debezium SQL Server connector reads the change tables that SQL Server’s change data capture (CDC) feature fills. The Debezium documentation says that it works with SQL Server on Azure once CDC is enabled on the database and the connector points at the Azure SQL endpoint. Azure SQL Database has its own CDC rules, documented by Microsoft:

Topic Azure SQL Database behaviour

Service tiers

Any service tier in the vCore purchasing model (single databases and elastic pools). In the DTU model, S3 or higher; Basic, S0, S1 and S2 are not supported.

Who can enable it

A member of db_owner.

Capture and cleanup

A CDC scheduler replaces SQL Server Agent: capture runs every 20 seconds and cleanup every hour. The frequency cannot be changed. Azure SQL Managed Instance and SQL Server on Azure VMs still use SQL Server Agent jobs.

Retention

The default change table retention is three days. Microsoft suggests lowering it if cleanup cannot keep up; for a migration, keep it longer than the connector’s longest expected outage.

Serverless

A paused serverless database does not run CDC.

Transaction log

Enabling CDC disables the aggressive log truncation of Accelerated Database Recovery, so the transaction log can grow while the capture job is behind.

Latency

No service level agreement on when changes reach the change tables; sub-second latency is not supported.

Enabling CDC on an Azure SQL database and on one table
EXEC sys.sp_cdc_enable_db;
GO

EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name   = N'customer',
    @role_name     = NULL,
    @supports_net_changes = 0;
GO

SELECT name, is_cdc_enabled FROM sys.databases;
SELECT name, is_tracked_by_cdc FROM sys.tables;

On Azure SQL Database the connector can authenticate with a managed identity of the Connect workers instead of a password. The Debezium SQL Server connector maps driver.authentication to the JDBC driver’s authentication property, and documents ActiveDirectoryManagedIdentity for Azure SQL Database:

SQL Server connector against Azure SQL Database with a managed identity (fragment)
{
  "connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
  "database.hostname": "bookshop-sql.database.windows.net",
  "database.port": "1433",
  "database.user": "00000000-0000-0000-0000-000000000000",
  "database.names": "bookshop",
  "driver.authentication": "ActiveDirectoryManagedIdentity",
  "driver.encrypt": "true",
  "driver.trustServerCertificate": "false",
  "topic.prefix": "legacy-sql",
  "table.include.list": "dbo.customer",
  "schema.history.internal.kafka.bootstrap.servers": "kafka:9092",
  "schema.history.internal.kafka.topic": "legacy-sql.schema-history"
}

database.user holds the client ID of a user-assigned managed identity (the placeholder above), which must also be created as a database user with SELECT on the captured tables and access to the CDC change data. Microsoft also publishes a sample that streams Azure SQL changes with Debezium, linked from the Debezium SQL Server on Azure section. The SQL Server connector in general is covered on SQL Server Connector, and the Azure SQL service itself on Azure SQL.

Where the connectors run

Preparing the database is half of the work. The connectors also need a runtime, and in the cloud there are more choices than on a laptop. They differ in how much of Kafka Connect you can configure, how you install plug-ins and JDBC drivers, how offsets are kept and who supports what.

Runtime What you manage What the service manages Fits

Self-managed Kafka Connect on EKS, GKE or AKS (Strimzi or plain Deployments)

The Connect image, plug-ins, workers, scaling and upgrades

The Kubernetes control plane (and the Kafka cluster, if it is MSK, Confluent Cloud or another managed Kafka)

Long migrations that need any Debezium connector at the exact version, custom SMTs, the Oracle driver, exactly-once source support and full control of worker settings

Amazon MSK Connect

A custom plug-in (ZIP or JAR in S3), the connector configuration and a worker configuration

Workers, capacity, placement in your subnets, logs to CloudWatch, S3 or Firehose

Teams on AWS that want no Connect cluster to operate and accept its Kafka Connect version

Confluent Cloud custom connectors

The plug-in ZIP or JAR and the connector configuration

The Connect infrastructure in Confluent Cloud; support covers the infrastructure only

Teams on Confluent Cloud that need a Debezium connector the fully managed catalog does not have (for example Oracle)

Confluent Cloud fully managed CDC connectors

The connector configuration only

Connector code, version and runtime; supported by Confluent

MySQL, PostgreSQL, SQL Server, MongoDB or MariaDB sources when the managed connector’s options cover the migration

Debezium Server with a cloud-native sink

One process (or a DebeziumServer resource for the Debezium Operator) and its offset store

The destination service: Kinesis, Pub/Sub, Event Hubs and others

One-hop pipelines into a cloud messaging service without Kafka

Red Hat build of Debezium

As for self-managed Kafka Connect, on OpenShift or RHEL

Red Hat-supported builds of the connectors and their Kafka runtime

Organisations that need vendor support for Debezium itself

The general trade-offs between Kafka Connect, Debezium Server and the Engine are on Debezium Architecture and Choosing a Deployment. The rest of this section covers what is specific to each managed option.

Self-managed Kafka Connect on EKS, GKE or AKS

Running Kafka Connect yourself on a managed Kubernetes cluster is the option with the fewest surprises: it is the same Strimzi KafkaConnect resource and the same custom image as on any other cluster, described in Running on Kubernetes and Installing Debezium. The cloud adds three things:

  • Identity. Use workload identity (EKS Pod Identity or IRSA, GKE Workload Identity, AKS Workload ID) for the worker pods so that config providers can read secrets and MSK IAM authentication can sign requests without static keys. See EKS Clusters, GKE Clusters and AKS Clusters.

  • Secrets. A config provider that reads AWS Secrets Manager, Google Secret Manager or Azure Key Vault keeps database passwords out of connector configurations (see Secrets Manager and KMS).

  • Kafka authentication. With MSK and IAM authentication, every Kafka client in the worker needs the SASL settings, including the clients that Debezium creates itself for the schema history topic and the Kafka signal channel. Those clients do not inherit the worker’s settings; they are configured with pass-through prefixes on the connector.

MSK IAM authentication for the schema history and signal clients of bookshop-oracle-source (fragment)
{
  "schema.history.internal.kafka.bootstrap.servers": "b-1.bookshop.example.kafka.eu-west-1.amazonaws.com:9098",
  "schema.history.internal.kafka.topic": "legacy.schema-history",
  "schema.history.internal.producer.security.protocol": "SASL_SSL",
  "schema.history.internal.producer.sasl.mechanism": "AWS_MSK_IAM",
  "schema.history.internal.producer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
  "schema.history.internal.producer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler",
  "schema.history.internal.consumer.security.protocol": "SASL_SSL",
  "schema.history.internal.consumer.sasl.mechanism": "AWS_MSK_IAM",
  "schema.history.internal.consumer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
  "schema.history.internal.consumer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler",
  "signal.kafka.bootstrap.servers": "b-1.bookshop.example.kafka.eu-west-1.amazonaws.com:9098",
  "signal.consumer.security.protocol": "SASL_SSL",
  "signal.consumer.sasl.mechanism": "AWS_MSK_IAM",
  "signal.consumer.sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required;",
  "signal.consumer.sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler"
}

The SASL values are the ones that the AWS documentation gives for IAM access control (AWS — Configure clients for IAM access control). The aws-msk-iam-auth JAR must be on the class path of the Connect worker, for example in the custom image. The same pass-through pattern applies to the other Debezium-created clients (the Kafka signal consumer uses the signal.consumer.* prefix shown above); the exact prefixes are listed in each connector’s pass-through properties section.

Amazon MSK Connect

MSK Connect runs Kafka Connect workers for you in your VPC subnets. Its model has consequences for Debezium:

  • Custom plug-ins. A plug-in is a JAR, or a ZIP that contains JARs, uploaded to S3. MSK Connect copies the object when the plug-in is created and does not follow later changes to it. Plug-ins cannot be updated in place: a new Debezium version is a new plug-in, and each connector is then updated to use it. AWS recommends bundling every dependency in the ZIP. For Oracle, that means the Debezium Oracle connector JARs plus the Oracle JDBC driver (ojdbc11); list the ZIP’s contents before you upload it, because the driver situation differs between the plug-in archive and the container image (see Installing Debezium).

  • Kafka Connect and Java versions. MSK Connect offers specific Kafka Connect versions with a fixed Java runtime; the AWS page lists Kafka Connect 3.7.x on Java 17. Debezium 3.7 connectors need Java 17 or later and Kafka Connect 3.1 or later, so the combination meets the documented minimums, but it is not the Kafka 4.x runtime that the Debezium images ship. Test the exact plug-in on MSK Connect before the migration depends on it.

  • Capacity. Capacity is measured in MSK Connect Units (one MCU is one vCPU and 4 GiB of memory) and is either provisioned (a fixed number of workers) or autoscaled. AWS’s own Debezium example states that the Debezium MySQL connector supports a single task and does not work with autoscaled mode, so use provisioned capacity with one worker. The same reasoning applies to the Oracle and PostgreSQL connectors, which also run one task.

  • Worker configuration. Converters and config providers go into a custom worker configuration. AWS’s Debezium example uses a Secrets Manager config provider for the database credentials.

  • Networking. Each worker takes an IP address in your subnets, and the database security groups must allow those addresses.

Use MSK Connect when the migration’s connectors are standard Debezium plug-ins and the team does not want to run Kafka Connect. Prefer a self-managed Connect cluster when you need exactly-once source support (a worker setting), a Kafka Connect version that MSK Connect does not offer, or fast iteration on custom SMTs, because each change is a new plug-in. The AWS Debezium example is Use Debezium source connector with configuration provider.

Confluent Cloud

Confluent Cloud offers two ways to run Debezium-based source connectors:

  • Fully managed CDC connectors. The Confluent connector catalog includes Debezium-based connectors for MySQL, PostgreSQL, SQL Server, MongoDB and MariaDB (the current ones are the "V2" versions). Confluent supplies and supports the connector; you choose from the properties that it exposes, which are not always the full set of Debezium properties. Check that the options you rely on (snapshot modes, signal channels, heartbeat action query) are offered before you plan around them.

  • Custom connectors. You upload a Kafka Connect plug-in as a .zip or .jar of up to 250 MB and run it in Confluent Cloud. This is the path for a Debezium connector that the managed catalog does not include, such as Oracle, or for a specific Debezium version. The documented limits include: only Java-based connectors, only selected AWS, Azure and Google Cloud regions, no writes to a local file system, connectors cannot be restarted from the Cloud Console or the restart API, egress to the database through public endpoints or (on Dedicated and Enterprise clusters on AWS) PrivateLink egress access points, and per-organization limits on the number of connectors and plug-ins. Confluent supports the Connect infrastructure only; troubleshooting the uploaded connector is your responsibility.

Because a custom connector cannot write to a local file system, any Debezium feature that needs a file (a file-based signal channel, a file-based schema history) is not available; use the Kafka-based options, which are the defaults on Kafka Connect anyway.

Debezium Server with cloud-native sinks

When the destination is a cloud messaging service rather than Kafka, Debezium Server can send events straight to it. Its sinks include Amazon Kinesis, Google Cloud Pub/Sub, Azure Event Hubs, Apache Kafka, Redis Streams, Pulsar, NATS, RabbitMQ Streams, HTTP, the JDBC sink and others. A migration that moves Bookshop from Cloud SQL to a Google-hosted service, with consumers already on Pub/Sub, could use the following configuration:

application.properties for Debezium Server: Cloud SQL for PostgreSQL to Pub/Sub
debezium.sink.type=pubsub
debezium.sink.pubsub.project.id=bookshop-migration
debezium.sink.pubsub.ordering.enabled=true

debezium.source.connector.class=io.debezium.connector.postgresql.PostgresConnector
debezium.source.offset.storage.file.filename=/debezium/data/offsets.dat
debezium.source.offset.flush.interval.ms=10000
debezium.source.database.hostname=127.0.0.1
debezium.source.database.port=5432
debezium.source.database.user=bookshop_cdc
debezium.source.database.password=${BOOKSHOP_CDC_PASSWORD}
debezium.source.database.dbname=bookshop
debezium.source.topic.prefix=modern
debezium.source.plugin.name=pgoutput
debezium.source.slot.name=bookshop_pubsub
debezium.source.publication.name=bookshop_pubsub_pub
debezium.source.publication.autocreate.mode=filtered
debezium.source.table.include.list=public.book,public.customer,public.purchase_order,public.order_line

127.0.0.1 assumes the Cloud SQL Auth Proxy runs next to Debezium Server. The Pub/Sub topics (modern.public.book and so on) must exist; the sink does not create them. With ordering enabled, the message key keeps the order per row. The offsets are in a local file, so the container needs a persistent volume (or a JDBC or Redis offset store); losing the file means a new snapshot. The Kinesis (debezium.sink.type=kinesis with debezium.sink.kinesis.region) and Event Hubs (debezium.sink.type=eventhubs with debezium.sink.eventhubs.connectionstring and debezium.sink.eventhubs.hubname) sinks follow the same pattern. Full details are on Debezium Server.

The Red Hat build of Debezium

Red Hat ships a supported build of Debezium for deployment on OpenShift with Streams for Apache Kafka, or on Red Hat Enterprise Linux. It follows the upstream releases with a delay and supports a subset of the upstream connectors and features; the supported version and connector list are in the Red Hat documentation and supported-configurations pages. Choose it when vendor support for the connectors themselves is a requirement; the configuration on this section’s pages applies, but check each property against the Red Hat build’s documentation for its version.

What goes wrong in the cloud

Symptom Likely cause Fix

PostgreSQL connector fails with logical decoding requires wal_level >= logical

rds.logical_replication, cloudsql.logical_decoding or wal_level was changed but the instance was not restarted

Reboot the instance (the Aurora writer, the Azure server) and check SHOW wal_level;

must be superuser to create FOR ALL TABLES publication

publication.autocreate.mode=all_tables (the default) on a managed service

Use filtered, or create the publication as the admin user before starting the connector

Storage on the PostgreSQL instance grows steadily; retained_wal keeps rising

The connector is stopped, or the captured tables are quiet while other databases on the instance write

Restart the connector; add heartbeat.interval.ms and heartbeat.action.query; drop slots of deleted connectors

PostgreSQL connector cannot find its slot after a maintenance event

An HA failover without failover slots, or Azure dropped an inactive slot when storage was low

Use slot.failover=true on PostgreSQL 17+, pg_failover_slots on Azure with PostgreSQL 16 or earlier; re-snapshot with an incremental snapshot

MySQL connector fails on restart because the binlog position in its offsets is no longer on the server

Binlog retention shorter than the outage (RDS default NULL, Azure default 0)

Raise binlog retention hours or binlog_expire_logs_seconds; recover with a new snapshot

MySQL snapshot fails with an access-denied or lock error at the start

No global read lock on RDS or Aurora, and LOCK TABLES not granted

Grant LOCK TABLES to the connector user

Oracle connector stops because an archive log it needs is not available (a gap in the log sequence)

Archived redo logs deleted from the RDS instance before the connector read them

Raise archivelog retention hours (and commit), check storage; recover per Troubleshooting & Failure Recovery

ORA-01031: insufficient privileges while granting to the connector user on RDS

The master user does not hold the privilege with the grant or admin option

Use rdsadmin.rdsadmin_util.grant_sys_object for SYS objects; check the master user privileges on RDS

SQL Server connector streams nothing from Azure SQL

The database is serverless and paused, CDC is not enabled on the table, or the tier is below S3 (DTU)

Check is_cdc_enabled, is_tracked_by_cdc and the tier; query sys.dm_cdc_errors

MSK Connect connector does not start or restarts in a loop

Autoscaled capacity with a single-task connector, a missing dependency in the plug-in ZIP, or a Java version mismatch

Use provisioned capacity with one worker; rebuild the plug-in with all JARs; check the CloudWatch worker log

Schema history topic cannot be read or written on MSK with IAM

The schema.history.internal.producer.* and consumer.* SASL settings are missing

Add the pass-through settings shown above

Verifying the cloud setup before the first snapshot

Run these checks against each managed database before you register a connector. Each one maps to a failure in the table above.

Database Checks

RDS or Aurora PostgreSQL

SHOW rds.logical_replication; is on, SHOW wal_level; is logical, the connector user is a member of rds_replication, the connector uses the writer endpoint, and pg_replication_slots has a slot per connector and no orphans.

Cloud SQL for PostgreSQL

SHOW wal_level; is logical, the user has REPLICATION, max_replication_slots has free slots, and the instance’s full flag list still contains every flag it had before the patch.

Azure Database for PostgreSQL flexible server

SHOW wal_level; is logical, max_worker_processes is at least 16, the HA slot strategy matches the PostgreSQL version, and storage alerts are in place.

RDS or Aurora MySQL

Automated backups on, binlog_format=ROW, binlog_row_image=FULL, CALL mysql.rds_show_configuration; shows the retention, and the user has LOCK TABLES.

Azure Database for MySQL flexible server

binlog_expire_logs_seconds is greater than zero and accelerated logs are off (or the retention behaviour is understood).

RDS for Oracle

SELECT log_mode FROM v$database; is ARCHIVELOG, rdsadmin.rdsadmin_util.show_configuration shows the archive log retention, v$database shows minimal supplemental logging, dba_log_groups lists all-column logging for each captured table, and the redo log groups are large enough.

Azure SQL Database

is_cdc_enabled on the database, is_tracked_by_cdc on each table, a supported tier, and an empty sys.dm_cdc_errors.

After the connector starts, the checks on Verification & Reconciliation and the metrics on Monitoring, Logging & Tracing apply unchanged. For a managed alternative to Debezium for a one-off move on AWS, AWS DMS is described in Architecture, Migration, Hybrid and Disaster Recovery; it does not give you the event stream that the anti-corruption layer and the other consumers in this section rely on.

References

All provider pages were read on 2026-11-09. The commands and configuration on this page are derived from them and from the Debezium 3.7 documentation; none was run against a cloud account.