Zack Biernat
Edited

Snowflake loader cannot authenticate to Snowflake DB (AWS quickstart terraform)

I see this in the `/aws/ec2/sp-sf-loader-server` cloudwatch logs.

```

SEVERE: Error executing request: POST https://cpzxxxx-gi2xxxx.us-east-2.aws.snowflakecomputing.com:443/session/v1/login-request?databaseName=xxxx&warehouse=xxxx&requestId=a1a8e0e0-8fcf-4e68-9646-5eab5520xxxx HTTP/1.1

```

My investigation into this response suggests that the url is not correct and that `us-east-2.aws` should be removed from that URI. But it is not clear to me which Terraform module is responsible for this URL. I tried shuffling around the tfvars for snowflake quite a bit but to no avail. When I remove the `us-east-2.aws` bit from the URL (using postman) it at least responds like an API instead of a webpage 404.

 

Has anyone else run into this issue? Providing an empty "snowflake_region" var yields an invalid url `https://cpzxxxx-gi2xxxx..azure.snowflakecomputing.com` and no idea why "azure" shows up there. 

0 2 3
Zack Biernat

For those experiencing the issue there is some default handling for region us-west-2 so changing to that region is the fix.

Josh Beemster

Thanks for posting the follow-up Zack Biernat - so just to confirm the fix was to always set the region for the Snowflake Region variable? Trying to think of how we could have prevented this issue so it sounds like either:

1. Enforcing a non-empty value or;
2. Defaulting to `us-west-2` could be an option