How to configure replication from PostgreSQL (RDS) to vanilla PostgreSQL?
You can use AWS Database Migration Services (DMS) to replicate full and/or change data to another system (such as S3 or a PostgreSQL database running on-premises or on EC2)


make sure use DMS v3.3 if you use PG 10+
create a new pg parameter group. set:
rds.logical_replication=1
save. modify the RDS instance to use that parameter group, apply changes
reboot the RDS instance


You'll need a VPN connection if your PG instance is on-prem (not on AWS network)

DMS supports DDL changes too

You can use AWS Schema Conversion Tool to migrate your schema from source to target