physical replica outside of AWS

0

Hello AWS Support Team, I am currently using an Amazon RDS PostgreSQL instance, and I need assistance in setting up a physical replica outside of AWS. The goal of this external replica is to have a local environment where we can analyze data and perform testing without affecting our production database on AWS. This setup will allow us to conduct in-depth analysis and testing on real data, helping us ensure accuracy and reliability in our production system. As this is an Amazon RDS instance, I understand that certain superuser-level tasks—such as creating physical replication slots and configuring pg_hba.conf for external access—are restricted. I do not have direct access to the rdsadmin user or sufficient privileges with the master user to set up physical replication by myself.: Could you assist with creating a replication slot for an external PostgreSQL instance? Configuring any necessary access rules to allow my computer to connect securely for replication purposes. If there are any additional steps or specific settings that need to be configured on our end, please let me know. Additionally, if physical replication is not feasible, I would appreciate any alternative recommendations for setting up a real-time or near-real-time replica outside of AWS.

Thank you for your help and support.

1 Answer
2

I apologize, but setting up a physical replica of an Amazon RDS PostgreSQL instance outside of AWS is not directly supported or recommended. RDS is designed as a managed service, and certain low-level operations required for physical replication are restricted for security and management reasons.

However, there are alternative approaches you can consider to achieve your goal of having a local environment for data analysis and testing:

  1. Logical Replication: RDS for PostgreSQL supports logical replication starting from version 10.4. This method allows you to replicate specific tables or databases to an external PostgreSQL instance. To set this up:

    • Enable logical replication by setting the 'rds.logical_replication' parameter to 1.
    • Create a logical replication slot on your RDS instance.
    • Use a client like pg_recvlogical to stream changes to your external PostgreSQL instance.
  2. Read Replica: You could create an RDS read replica in AWS and then use AWS Database Migration Service (DMS) to continuously replicate data from the read replica to an external PostgreSQL instance.

  3. Periodic Snapshots: Take regular snapshots of your RDS instance and restore them to a local PostgreSQL instance. This won't provide real-time data, but it can be useful for analysis and testing purposes.

  4. AWS DMS: Use AWS Database Migration Service to set up continuous replication from your RDS instance to an external PostgreSQL database.

For any of these methods, you'll need to ensure proper network connectivity and security settings between your AWS environment and your local infrastructure. This may involve configuring VPN connections or using AWS Direct Connect.

Remember that these alternatives may have limitations compared to physical replication, such as increased latency or potential data inconsistencies. Always consider the security implications of replicating your production data outside of AWS, and ensure you have appropriate measures in place to protect sensitive information.

If you need further assistance with implementing any of these solutions, please don't hesitate to ask for more detailed guidance.
Sources
Performing logical replication for Amazon RDS for PostgreSQL - Amazon Relational Database Service
Amazon RDS for PostgreSQL - Amazon Relational Database Service

profile picture
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions