Connect Azure postgres DB from AWS

Romil Agarwal 0 Reputation points
2026-06-30T16:45:16.48+00:00

How do I connect my Azure postgres flexible server to an AWS VPC? I have a private link endpoint service created in AWS already.

Azure Database for PostgreSQL
0 comments No comments

2 answers

Sort by: Most helpful
  1. Manoj Kumar Boyini 17,950 Reputation points Microsoft External Staff Moderator
    2026-07-02T12:02:04.78+00:00

    Hi @Romil Agarwal

    Azure Database for PostgreSQL Flexible Server cannot connect directly to an AWS PrivateLink endpoint or endpoint service. Although Azure Private Link and AWS PrivateLink provide similar functionality, they are separate cloud-provider technologies and are not interoperable.

    The supported approach is to establish network connectivity between your AWS VPC and the Azure virtual network, for example by using:

    • Site-to-Site VPN (recommended for most deployments)

    Azure ExpressRoute together with AWS Direct Connect through a supported connectivity partner for enterprise/private connectivity

    Once network connectivity and DNS resolution are configured, applications running in your AWS VPC can connect to the PostgreSQL Flexible Server using its private FQDN over the private network.

    The recommended architecture depends on how your Flexible Server was deployed:

    Private access (Virtual Network Integration): Route your AWS VPC to the Azure VNet hosting the Flexible Server through the VPN/interconnect.

    Public access: You can optionally create an Azure Private Endpoint for the server and access it over the VPN/interconnect. Note that Azure Private Endpoints are supported only for servers deployed in Public access mode.

    Could you please confirm:

    Is your PostgreSQL Flexible Server deployed with Private access (VNet integration) or Public access?

    Do you require fully private connectivity, or is public access with firewall rules acceptable?

    This information will help determine the most appropriate connectivity architecture for your environment.

    References:
    https://learn.microsoft.com/en-us/azure/postgresql/network/concepts-networking-private
    https://learn.microsoft.com/en-us/azure/postgresql/network/how-to-networking-servers-deployed-public-access-add-private-endpoint?tabs=portal-add-private-endpoint-connections

    Hope this helps, Please let us know if you have any questions.

    Was this answer helpful?

    0 comments No comments

  2. Andriy Bilous 12,186 Reputation points MVP
    2026-06-30T20:46:40.2166667+00:00

    Hello

    If your Azure Database for PostgreSQL Flexible Server is configured with private access (VNet integration), you cannot directly connect it to an AWS PrivateLink endpoint. Azure Private Link and AWS PrivateLink are different technologies and are not interoperable.

    Option 1: Site-to-Site VPN (recommended for many deployments)

    Create secure network connectivity between your AWS VPC and Azure VNet.

    • Configure an Azure VPN Gateway in the VNet containing the PostgreSQL Flexible Server.
    • Configure an AWS Site-to-Site VPN using a Virtual Private Gateway or Transit Gateway.
    • Update Azure Network Security Groups (NSGs) and PostgreSQL firewall/network settings as needed.
    • Connect using the PostgreSQL server's private IP/DNS name.

    This is a common solution for hybrid Azure AWS connectivity.
    https://docs.aws.amazon.com/vpn/latest/s2svpn/

    Was this answer helpful?

    0 comments No comments

Your answer

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