Power BI cannot validate the SSL certificate of an RDS PostgreSQL server
An 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.
Fix it fast
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"2Match what you see, then jump to its fix
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.pem3Verify
Refresh the dataset or choose Get Data again.
# Power BI Desktop: Home > RefreshConfirmed by docs.aws.amazon.com
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 nameConfirmed by docs.aws.amazon.com
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
Databases
DBeaver cannot run pg_restore: the utility is not found in the client home
Utility 'pg_restore' not found in client home '/usr/lib' (/usr/lib)
DBeaver runs pg_restore from a local PostgreSQL client folder; it does not bundle one.
3 causes, each with a fixDatabases
DBeaver cannot download the PostgreSQL driver from Maven
The PostgreSQL driver files are missing and the download does not complete
DBeaver downloads the PostgreSQL JDBC driver from a Maven repository the first time you connect.
3 causes, each with a fixDatabases
python manage.py migrate finishes but the tables for my app are missing
relation "myapp_book" does not exist
migrate only applies migration files that exist.
3 causes, each with a fixDatabases
Django save fails on PostgreSQL: null value in a column violates a not-null constraint
django.db.utils.IntegrityError: null value in column "price" of relation "shop_product" violates not-null constraint
A model field is NOT NULL in the database unless it has null=True.
3 causes, each with a fixDatabases
Django migration on PostgreSQL stops with 'pending trigger events'
django.db.utils.OperationalError: cannot ALTER TABLE "mytable" because it has pending trigger events
PostgreSQL runs a Django migration in one transaction.
2 causes, each with a fixDatabases
Django cannot connect to PostgreSQL: connection refused on port 5432, locally or in Docker
Is the server running on that host and accepting TCP/IP connections?
Connection refused means nothing accepted the connection at the host and port Django used.
4 causes, each with a fix