
I Tried Out the Integration of Aurora PostgreSQL and Amazon S3 Tables (Preview)
This page has been translated by machine translation. View original
Introduction
On December 2, 2026, the integration between Aurora PostgreSQL and Amazon S3 Tables became supported in preview.
This integration continuously replicates the operational data of Aurora PostgreSQL as Apache Iceberg tables in S3 Tables. In this article, I chose one table with a data rule, configured the integration while excluding the ssn column, and checked the initial sync and the propagation of changes with Athena.
Test environment
- Region: Tokyo (ap-northeast-1)
- Aurora PostgreSQL: 18.4 (provisioned)
- Instance class: db.r6g.large (1 instance)
- AWS CLI: 2.43.1
- SQL execution: RDS Data API
- Queries: Amazon Athena
Configuring the integration
Parameter group
According to the announcement, the integration supports Aurora PostgreSQL 16.4 and later, 17.4 and later, and 18.3 and later. The four logical replication-related parameters are set with ApplyMethod set to pending-reboot.
aws rds create-db-cluster-parameter-group \
--db-cluster-parameter-group-name s3t-verify-params \
--db-parameter-group-family aurora-postgresql18 \
--description "Aurora PostgreSQL integration with S3 Tables verification"
aws rds modify-db-cluster-parameter-group \
--db-cluster-parameter-group-name s3t-verify-params \
--parameters \
ParameterName=rds.logical_replication,ParameterValue=1,ApplyMethod=pending-reboot \
ParameterName=aurora.enhanced_logical_replication,ParameterValue=1,ApplyMethod=pending-reboot \
ParameterName=aurora.logical_replication_backup,ParameterValue=0,ApplyMethod=pending-reboot \
ParameterName=aurora.logical_replication_globaldb,ParameterValue=0,ApplyMethod=pending-reboot
In this verification, I specified this parameter group when creating the cluster, and created the integration after rebooting the instance.
Table bucket and policy
Create the target table bucket, and attach a policy that allows the service principal export.rds.amazonaws.com to access the bucket and tables. The policy has two statements, one for the bucket and one for the tables, and both specify conditions on aws:SourceAccount and aws:SourceArn (the ARN of the cluster).
aws s3tables create-table-bucket --name s3t-verify-bucket
aws s3tables put-table-bucket-policy \
--table-bucket-arn arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket \
--resource-policy file://s3t-bucket-policy.json
In the policy, I allowed s3tables:* only for this bucket and its tables.
s3t-bucket-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowRdsIntegrationBucket",
"Effect": "Allow",
"Principal": { "Service": "export.rds.amazonaws.com" },
"Action": "s3tables:*",
"Resource": "arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket",
"Condition": {
"StringEquals": { "aws:SourceAccount": "<ACCOUNT_ID>" },
"ArnEquals": { "aws:SourceArn": "arn:aws:rds:ap-northeast-1:<ACCOUNT_ID>:cluster:s3t-verify-cluster" }
}
},
{
"Sid": "AllowRdsIntegrationTables",
"Effect": "Allow",
"Principal": { "Service": "export.rds.amazonaws.com" },
"Action": "s3tables:*",
"Resource": "arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket/table/*",
"Condition": {
"StringEquals": { "aws:SourceAccount": "<ACCOUNT_ID>" },
"ArnEquals": { "aws:SourceArn": "arn:aws:rds:ap-northeast-1:<ACCOUNT_ID>:cluster:s3t-verify-cluster" }
}
}
]
}
Data rules
In the source testdb database, I created two tables, demo_customers and demo_orders, and inserted 3 rows into demo_customers. The values in the ssn column are dummy values.
CREATE TABLE public.demo_customers (id INT PRIMARY KEY, name VARCHAR(100), ssn VARCHAR(11), created_at TIMESTAMP DEFAULT now());
CREATE TABLE public.demo_orders (id INT PRIMARY KEY, customer_id INT, amount INT);
INSERT INTO public.demo_customers (id, name, ssn) VALUES (1,'first row','000-00-0001'),(2,'second row','000-00-0002'),(3,'third row','000-00-0003');
The tables and columns to replicate are specified in the data rules JSON. The following data-rules.json is a rule that replicates only demo_customers, excluding the ssn column.
[
{"Database":"*","Schema":"*","Table":"*","Properties":{"TargetPrefix":"s3t_verify","ExcludeColumns":["*"]}},
{"Database":"testdb","Schema":"public","Table":"demo_customers","Properties":{"IncludeColumns":["*"]}},
{"Database":"*","Schema":"*","Table":"*","Properties":{"ExcludeColumns":["ssn"]}}
]
The first rule specifies s3t_verify as TargetPrefix and excludes all columns of all tables. The second rule re-includes all columns of demo_customers, and the third rule excludes the ssn column from all tables. I placed the rule that excludes ssn after the IncludeColumns rule.
Creating the integration
Create the integration with create-integration. Specify the ARN of the cluster as the source and the ARN of the table bucket as the target.
Because --data-rules was not available in AWS CLI 2.43.1, I copied the bundled RDS service model file. I added a string-type DataRules to CreateIntegrationMessage and Integration in the copied file, and loaded it with AWS_DATA_PATH. With this method, I was able to run the command with --data-rules, and the integration behaved according to the data rules.
make_datarules_model.py
SRC is the path to service-2.json in an environment where AWS CLI v2 was installed on Linux with the official installer. Replace it with the path to the same file in your environment.
"""公開済み AWS CLI の RDS モデルに CreateIntegration の --data-rules を足す。
使い方: python3 make_datarules_model.py <出力ディレクトリ>
その後 AWS_DATA_PATH=<出力ディレクトリ> を付けて aws rds create-integration を実行する。
元のモデルは変更しない。DataRules は、ドキュメントの記載(JSON 文字列として渡す)に合わせて String にする。
"""
import json
import pathlib
import sys
SRC = pathlib.Path("/usr/local/aws-cli/v2/current/dist/awscli/botocore/data/rds/2014-10-31/service-2.json")
out = pathlib.Path(sys.argv[1]) / "rds" / "2014-10-31"
out.mkdir(parents=True, exist_ok=True)
model = json.loads(SRC.read_text())
model["shapes"]["Integration"]["members"]["DataRules"] = {"shape": "String"}
members = model["shapes"]["CreateIntegrationMessage"]["members"]
members["DataRules"] = {"shape": "String", "documentation": "<p>Data rules (JSON string).</p>"}
(out / "service-2.json").write_text(json.dumps(model))
print("wrote", out / "service-2.json")
Specify the output directory of the model created by the script in AWS_DATA_PATH, and create the integration.
python3 make_datarules_model.py ./aws-model
AWS_DATA_PATH=./aws-model aws rds create-integration \
--integration-name s3t-verify-integration \
--source-arn arn:aws:rds:ap-northeast-1:<ACCOUNT_ID>:cluster:s3t-verify-cluster \
--target-arn arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket \
--data-rules file://data-rules.json \
--output json
About 6 minutes after execution, the Status checked with describe-integrations changed from creating to active. At that time, the source table had 3 rows.
State after the initial sync
Namespaces and tables
aws s3tables list-namespaces \
--table-bucket-arn arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket \
--query 'namespaces[].namespace' --output json
[
[
"integrations_metadata"
],
[
"s3t_verify_testdb"
]
]
aws s3tables list-tables \
--table-bucket-arn arn:aws:s3tables:ap-northeast-1:<ACCOUNT_ID>:bucket/s3t-verify-bucket \
--namespace s3t_verify_testdb \
--query 'tables[].name' --output json
[
"public_demo_customers"
]
integrations_metadata is the namespace where the integration stores the per-table state. The namespace name for the replicated data is s3t_verify_testdb, which joins TargetPrefix and the database name. The table name is public_demo_customers, which joins the source schema name and table name. Only one table, demo_customers, was replicated.
Row count and columns
To read from Athena, enable "Integration with AWS analytics services" once in the region of the table bucket. Once enabled, the tables appear in s3tablescatalog in the AWS Glue Data Catalog.
aws athena start-query-execution \
--work-group s3t-verify \
--query-string 'SELECT count(*) AS n FROM "s3t_verify_testdb"."public_demo_customers"' \
--query-execution-context Catalog=s3tablescatalog/s3t-verify-bucket
The count retrieved with get-query-results matched the source.
n
3
The result of SELECT * did not include the ssn column that exists in the source.
id name created_at
1 first row 2026-12-02 16:57:37.589914
2 second row 2026-12-02 16:57:37.589914
3 third row 2026-12-02 16:57:37.589914
Propagation of changes
Time until propagation
On the source, I executed SQL statements one at a time with the Data API. I repeated queries to Athena at intervals of about 8 seconds, and measured the time from the completion of the SQL until the change became visible.
| Operation | SQL executed on the source | Time until propagation |
|---|---|---|
| INSERT | INSERT INTO public.demo_customers (id, name, ssn) VALUES (1001, 'cdc_insert', '999-99-9999') | 86 seconds |
| UPDATE | UPDATE public.demo_customers SET name = 'cdc_update' WHERE id = 1001 | 52 seconds |
| DELETE | DELETE FROM public.demo_customers WHERE id = 1001 | 59 seconds |
| Add column (no default) | ALTER TABLE public.demo_customers ADD COLUMN email VARCHAR(100) | 51 seconds |
| INSERT using the added column | INSERT INTO public.demo_customers (id, name, ssn, email) VALUES (1002, 'cdc_email', '888-88-8888', 'a@example.com') | 51 seconds |
The propagation of the column addition was determined at the point when the email column appeared in Athena's information_schema.columns.
Table after adding the column
Even after the column was added, the ssn column remained excluded.
id name created_at email
1 first row 2026-12-02 16:57:37.589914
2 second row 2026-12-02 16:57:37.589914
3 third row 2026-12-02 16:57:37.589914
1002 cdc_email 2026-12-02 17:09:23.042398 a@example.com
Summary
I tried the integration between Aurora PostgreSQL and S3 Tables.
It is currently in preview, but if you want to replicate Aurora PostgreSQL data to S3 Tables and build near-real-time dashboards or reports, please try this update.
