Snowflake SDK Configuration: CertificateError

I had to wrestle with getting the Snowflake SDK working, kept encountering the error:

250001: Could not connect to Snowflake backend after 0 attempt(s).Aborting.

The underlying error to which was:

SSLError(CertificateError("hostname '' doesn't match either of '*', '*', '*', '*', '*', '*'"))

I read much on the tubes about how region needs to be set, the account name configured, some places indicating region and cloud provider should be passed with account name, etc., etc. If you haven’t already, it helps to read:

But the following is what worked for me:

  • In snowSet region to ‘us-west-2’ (I did this even though my account is in ‘us-east-2’)
  • For account name, pass ‘<org>-<account>’. The URL becomes ‘<org>-<account>`.

So with my config file having:

region = us-west-2
username = <username>
password = <password>
dbname = demo
schemaname = public
warehousename = compute_wh

the following was able to work:

√ ~/.snowsql 18:22:53 % snowsql -a <org>-<account>
* SnowSQL * v1.2.23
Type SQL statements or !help

Leave a Reply

Your email address will not be published. Required fields are marked *