Setting up Athena connection in VSCode

0

I am trying to set-up Athena connection in VSCode.

When I do Test Connection, I get this error

Error opening connection Inaccessible host: `athena.us-east-1.amazonaws.com'. This service may not be available in the `us-east-1' region.

I tried this successfully

nc -v athena.us-east-1.amazonaws.com 443 Connection to athena.us-east-1.amazonaws.com port 443 [tcp/https] succeeded!

How can I fix this error

Athena-in-VSCode

adbdkb
asked a year ago1079 views
1 Answer
0

Hello,

I understand that you are getting Error opening connection Inaccessible host: athena.us-east-1.amazonaws.com'. This service may not be available in the us-east-1' region. When you perform a test connection while Setting up Athena connection in VSCode.

Usually this error is more related to networking but as mentioned, you are succeeded to check the connectivity with the Athena endpoint. So, here the networking aspect does not seem to be causing the problem. It is also possible for endpoints to be inaccessible once in a while.

I tried replicating in my test environment and I was successfully able to connect with Athena from VSCode in us-east-1 region without any issue. So, I believe that it can be the intermittent issue for you.

Further you can also check with these:

  1. Try with disconnecting the VPN if you are connected with any.
  2. Try with latest version of VSCode.

Also, please open a support ticket, if you are facing this issue frequently/continously.

Enter image description here

Below is the JSON for the successful connection: { "connectionMethod": "Profile", "previewLimit": 50, "driver": "driver.athena", "name": "Test", "workgroup": "primary", "region": "us-east-1", "outputLocation": "s3://bucket_name/ ", "profile": "default", "group": "Test" }

AWS
SUPPORT ENGINEER
answered a year ago
  • I do have the latest version of VSCode - it was 1.78. updated today to Version: 1.78.1. Also, after your suggestion, I did try disconnecting from VPN and it worked. But, I have to be connected to VPN to do my other tasks. Is there a way to set-up that I can still connect even though I am connected to VPN? Thanks

  • One other test I did was to run this script from terminal on my Mac - from this link https://stackoverflow.com/questions/43338442/command-line-tool-to-access-amazon-athena and it runs without any issues even when I am connected to VPN. So, is there a set-up I can do in VSCode that will allow me to connect to Athena even when I am connected to VPN?

  • One other observation - And when I tried to set-up a connection from dBeaver to Athena, I had to add these extra user parameters when looking at the driver settings - AwsCredentialsProviderArguments, AwsCredentialsProviderClass, UseResultsetStreaming, Workgroup, ageforResultReuse, enableResultReuse. Do we need to do something similar on VSCode, and how would we define those in VSCode. Of these the Workgroup is part of the connection definition, but do we need to add any other and where?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions