Since the PostgreSQL Flexible Server is private, you need:
- A private endpoint configured for the PostgreSQL Flexible Server.
- The AML workspace has access to the same VNet where the PostgreSQL Flexible Server is located
Second thing, in your case the AML and PostgreSQL Flexible Server are in different regions, so you need a VNet Peering to connect the VNet of the AML workspace with the VNet of the PostgreSQL Flexible Server. the peering needs to allow traffic flow between VNets and the NSG rules should allow traffic from the AML workspace subnet to the PostgreSQL subnet on port 5432.