Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Databases and Redis

Power BI cannot validate the SSL certificate of an RDS PostgreSQL server

ErrorAn error happened while reading data from the provider: The remote certificate is invalid according to the validation procedure.

Short answer

Power BI asked PostgreSQL for an encrypted connection and Windows could not trace the server certificate to a trusted root. For Amazon RDS that means the RDS root CA is missing from the Trusted Root Certification Authorities store, or you connect with an address that is not the instance endpoint name. Install the RDS root certificates and use the endpoint.

  • Applies to Power BI Desktop (Npgsql based PostgreSQL connector), Amazon RDS for PostgreSQL 17, Windows
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    On the same Windows machine, test the connection with the RDS bundle and full verification, using psql. If it fails there too, the bundle is not the issue and the name or the instance is; if it works, only the Windows trust store is missing the CA.

    psql "host=mydb.xxxx.us-east-1.rds.amazonaws.com port=5432 dbname=postgres user=postgres sslrootcert=global-bundle.pem sslmode=verify-full"
  2. 2Match what you see, then jump to its fix

    1. 1The verify-full test works with sslrootcert, but Power BI still shows the errorThe RDS root CA is not in the Windows trusted root storeFix
    2. 2You typed an IP address, a CNAME alias or a tunnel address such as localhost as the serverPower BI connects with a name that is not in the certificateFix

What does the error look like?

  • An error happened while reading data from the provider: The remote certificate is invalid according to the validation procedure.

Cause 1 of 2

The RDS root CA is not in the Windows trusted root store

1Check

RDS signs each server certificate with a regional root CA from Amazon (rds-ca-rsa2048-g1 by default). With verification the client must have the RDS CA certificates in its trust store. Microsoft's connector page says the machine might need to install the server's SSL certificate into its Trusted Root Certification Authorities.

psql "host=mydb.xxxx.us-east-1.rds.amazonaws.com dbname=postgres user=postgres sslrootcert=global-bundle.pem sslmode=verify-ca"

2Fix

Download the bundle for your Region, or the global one, and import the root certificates into the Trusted Root Certification Authorities store on the machine that runs Power BI. Register only the root CA certificates, not the intermediates.

curl -o global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem

3Verify

Refresh the dataset or choose Get Data again.

# Power BI Desktop: Home > Refresh

Confirmed by docs.aws.amazon.com

Did this fix it?

Cause 2 of 2

Power BI connects with a name that is not in the certificate

1Check

RDS puts the DB instance endpoint in the certificate as its Common Name, so verification only succeeds for that name. Compare the Server box in Power BI with the endpoint in the RDS console.

psql "host=203.0.113.10 dbname=postgres user=postgres sslrootcert=global-bundle.pem sslmode=verify-full"

2Fix

Enter the exact instance endpoint (the long rds.amazonaws.com name) as the server in Power BI.

psql "host=mydb.xxxx.us-east-1.rds.amazonaws.com dbname=postgres user=postgres sslrootcert=global-bundle.pem sslmode=verify-full"

3Verify

The psql test connects, and Power BI loads the navigator.

# Power BI Desktop: Get Data > PostgreSQL database > enter the endpoint name

Confirmed by docs.aws.amazon.com

Did this fix it?

How do I stop it coming back?

  • Keep the RDS root bundle in your machine-setup script, for desktops and for the gateway.
  • Use the endpoint name everywhere, including in saved Power BI sources.
  • Re-check the CA when you change it on the instance: the bundles contain rds-ca-rsa2048-g1, rds-ca-rsa4096-g1 and rds-ca-ecc384-g1.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.