how to connect to AWS RDS Postgres from Azure data factory when Public accessibility is no in RDS

Tharun CS 0 Reputation points
2023-05-05T08:36:19.8766667+00:00

I have a AWS RDS Postgres , I need to fetch data AWS RDS Postgres and move it into AZure using Azure Data factory, I have setup VPN connectivity between AWS & Azure resource , the local gateway shows connection status as connected but i am not able to connect to AWS RDS postgres and the error reads as :"ERROR [08001] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Connection refused. Verify Host Name and Port Number. ERROR [HY000] [Microsoft][ODBC PostgreSQL Wire Protocol driver]Can't connect to server on 'dev-dc-v2-db-16-02-2023.cogypllvhr9i.ap-south-1.rds.amazonaws.com' Activity ID: 56263991-4d5f-43da-a1a8-ba37f8586dc7." Please let me what is the best possible solution on this

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,786 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SAGAR SATAPATHY 150 Reputation points
    2023-05-05T08:46:58.5033333+00:00

    To connect to an AWS RDS Postgres instance from Azure Data Factory when public accessibility is disabled, you need to ensure that the network connectivity between Azure and AWS is correctly configured, and the security groups and firewall settings allow traffic between the two environments. Here are a few steps to troubleshoot your issue:

    1. Check network connectivity: Make sure that the VPN connection between your Azure and AWS environments is correctly configured and active. You can verify this in the AWS VPC console for the VPN connection status and the Azure portal for the Azure Virtual Network Gateway connection status.
    2. Check AWS security group rules: Ensure that the security group associated with the RDS instance allows inbound traffic from the Azure Data Factory's managed private endpoint or from the subnet where your integration runtime is running in Azure.
    3. Check Azure NSG rules: If you have a Network Security Group (NSG) associated with the Azure subnet, make sure it allows outbound traffic to the AWS RDS Postgres instance.
    4. Verify the connection string: Double-check the connection string used in the Azure Data Factory's source settings. Make sure the hostname, port number, and credentials are correct.
    5. Test the connectivity: You can use tools like psql or an application like pgAdmin to test the connectivity from a VM in your Azure environment to the AWS RDS Postgres instance. This can help you identify if the issue is related to the Azure Data Factory configuration or the network settings.

    If you have followed these steps and are still facing issues, you may need to review your network configuration in more detail or consult your network administrators to ensure proper connectivity between the Azure and AWS environments.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.