Search code examples
amazon-web-servicesjdbcamazon-athenasql-workbench-j

Creating a JDBC connection to Athena doesn't work


I have a DB on Athena up and running, and now I'm trying to connect to it using SQLWorkbenchJ. I downloaded the JDBC drivers provided by AWS, added it to my workbench setup - but it just won't connect. The exact error message is

[Simba][AthenaJDBC] An error has been thrown from the AWS Athena client. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method.

The URL I'm connecting to is jdbc:awsathena://athena.[my-region].amazonaws.com:443

I've added the S3OutputLocation key as specified, and the IAM user has the necessary policies attached to it. Anyone have any clue what I'm missing?


Solution

  • I figured out the error was because AWS appends a space to the access key when copying from the web UI. For anyone who runs into this error, please try creating a new pair of credentials, downloading them as a CSV file and then explicitly copying the keys to your Workbench. Worked for me.