Forum Discussion

SilvaEric1's avatar
SilvaEric1
Regular Visitor
6 years ago

AWS Postgres: 'The remote certificate is invalid'

Hi All, 

I've tried the attached instructions, but I'm still receiving the following error message when trying to connect to AWS RDS Postgres.

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

Since that post is a couple of years old, I thought I'd ask if there are any additional items to look for? I've installed the latest version of npgsql and imported the AWS RDS Certificates. I'm able to successfully connect to the Database via PgAdmin so it's not an account issue. Any help would be appreciated! 

Thanks, 

Eric

16 Replies

  • I ran into the same error, and disabling encryption will also make that error go away. 

     

    To disable encryption

    1. File --> Options and settings --> Data source settings
    2. Click Edit Permissions on your connection
    3. Uncheck Encrypt Connections
    • EylesIT's avatar
      EylesIT
      Resolver II

      dustout, this doesn't work for me. I get stuck in an endless loop. This is what happens for me:

       

      I select "Get Data", then "Database, then "PostgreSQL database" and click Connect.

      It prompts me for the Server and Database. I enter the RDS endpoint and database name and click OK.

      I get the "Unable to connect" error (interestinly, it has not even asked for the usernamer and password)

      I click "Cancel"

      I go to "File", "Options and settings", "Data source settings".

      With the "Global permiussions" radio button selected, I see my RDS endpoint listed.

      I click on the RDS endpoint and click "Edit permissions"

      The "Encrypt connections" checkbox is checked.

      I un-check the checkbox and click "OK", then "Close".

      Once more, I select "Get Data", then "Database, then "PostgreSQL database" and click Connect.

      Once more, it prompts me for the Server and Database. I enter the RDS endpoint and database name and click OK.

      This time I get a different error message. I get "We couldn't authenticate with the credentials provided. Please try again"

      I enter the username and password and click "Connect"

      Once again, I get the first "Unable to connect" error message dialog again!

      I click "Cancel".

      I go back to "File", "Options and settings", "Data source settings".

      The "Encrypt connections" checkbox has become checked again by itself, without me changing it.

       

      Any ideas on how solve this?

      • d4yn1sh's avatar
        d4yn1sh
        New Member

        This is really frustrating. Were you able to resolve the endless loop?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your post bro, It helped me to solve this problem.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I literally made an account to just upvote this post. 

       

      I was about to run go down a coding rabbithole to tackle this issue.

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi SilvaEric1 ,

    As tested, I can't reproduce the problem you encountered, please create support ticket .

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    SilvaEric1 Were you able to find a solution or a workaround for this? We are stuck with the same problem

  • Anonymous's avatar
    Anonymous
    Not applicable

    I was also stuck with this issue today. The solution might be obvious to some people but I think it's not clearly mentioned in the other conversation. If you have done everything that is mentioned in the linked instructions than one more thing you should check is that are you using the qualified domain name when connecting to AWS. By this I mean something that ends with ...amazonaws.com. I think you just can't use aliases with the AWS certificate. I didn't invent the solution but happened to stumble on it in this community conversation.

  • Anonymous's avatar
    Anonymous
    Not applicable

    What worked for me (10 min solution):

    I had Postgre DB I was trying to connect to, and because is Postgre connection for some reason in Power BI problematic to connect to and was always ending on the same error as yours did, I tried to connect to the same DB via Rest API (JSON) instead and that worked.

    1. Install Zappysys Data Gateway - download 30 days trial here 
    2. In Zappysys:
       Data Source tab -> Add ->
       Data Source name = whatever you like to call your connection
       Connector type = Native - ZappySys JSON driver
      -> OK
    In next window leave everything as it is, and put your Rest API URL, for ex. https://prod.tralala.whoho.dev/sales
    and then bit lower in Settings tab use for HTTP request method = GET

    Click on Test connection, it should work.

    3. search in your Win search panel for ODBC Data Sources (you should have that already installed with your Power BI installation automatically)
    4. in ODBC:
     
    Click on Add -> scroll the whole way down for ZappySys JSON driver -> Finish ->
    Data Source Name = whatever you like to call your connection, for. ex. MyEvilPostgre connection -> OK
    5. in Power BI
    Get data -> ODBC -> choose from the list your connection from ODBC, in our ex. MyEvilPostgre connection. -> OK

    6. celebrate after days of torture that your evil connection is finally working

  • gabrielfs's avatar
    gabrielfs
    Regular Visitor

    Even installing the SSL certificate and being able to update locally, it doesn't work online. It's like I need to release something more, but it just won't. I can't even create the connection for the refresh and when I open the report it gives an error because it is a direct query.

     

    • bayronbarrios's avatar
      bayronbarrios
      New Member

      Dear, good afternoon. Have you found any way to establish an online connection between Power BI and AWS RDS? I'm able to connect from Power BI Desktop by installing the Amazon certificates on my PC, but when I try to refresh my reports, it asks for certificates.