Failure querying AWS Athena from DBeaver using IAM profiles / ephemeral credentials

Viewed 704

When I try to configure DBeaver to query Athena, it does not work. I get errors about loading a credentials provider class.

We use ephemeral credentials / IAM profiles in order to authenticate to everything. So, I'm trying to leverage those and avoid insecure IAM users. So, I'm not populating the user name or password.

Any advice?

1 Answers

I stumbled across this GitHub and it worked like a charm: https://github.com/dbeaver/dbeaver/issues/3918#issuecomment-511484596.

Here are the relevant notes (slightly modified for easier understanding):

  1. Do your normal AWS login process to refresh your credentials (in our case, we use okta + gimme_aws_creds for this).
  2. Go to driver properties on your DBeaver Athena connection and set:
    • AwsCredentialsProviderClass to com.simba.athena.amazonaws.auth.profile.ProfileCredentialsProvider
    • AwsCredentialsProviderArguments equal to the name of the profile you want to use (see ~/.aws/config to see which profiles you have) -- we use "default".
  3. Test Connection and it should work.
Related