Amazon RDS for PostgreSQL Error: Unable to Validate Certificate
Issue
When setting up or testing a connection, the following error appears:
Unable to validate certificate. We could not connect to Source due to the invalid credentials. Please update the credentials.
Although the error message refers to invalid credentials, the Fivetran Platform Connector logs show the following underlying error:
org.postgresql.util.PSQLException: FATAL: database "<database_name>" does not exist
Environment
- Connector: Amazon RDS for PostgreSQL
Resolution
To resolve this issue, do the following:
- In Fivetran, go to your Amazon RDS for PostgreSQL connection page.
- Select the Settings tab.
- Click Edit connection.
- Make a note of the database name specified in the Database field.
- Log in to your PostgreSQL server using
psqlor your preferred database client. - List the available databases.
- Verify that the database name specified in the Fivetran connection setup form matches an existing database on the server.
- If the database doesn’t exist, either create it or identify the correct existing database name.
- In Fivetran, update the Database field with the correct database name.
- Click Save & Test.
If the error persists, verify that the Fivetran user has CONNECT privilege on the database:
GRANT CONNECT ON DATABASE <db_name> TO <fivetran_user>;
Cause
This issue occurs when the database name configured in Fivetran doesn't match an existing database on the PostgreSQL server. When this happens, PostgreSQL rejects the connection attempt.