AWS Athena ODBC Connections with Pennkey Login on the HPCC

If you desire to interact with this data directly using R, Python, Stata or Matlab using an ODBC connection please contact us for access.

Before you request access you should create a Upenn-Bitbucket account if you don’t already have one.

  1. Visit and login using your <pennkey username>
  2. Visit and add a new key
  3. Copy the result of cat ~/.ssh/  from the HPCC and paste in the new key input prompt on Bitbucket

After we have granted you read-only access to the aws-federated-auth repo you can follow these instructions. They are designed to work on the HPCC.

and log in with your Pennkey and Password(2FA if enable).

Your output should include a line like(not that in most cases the rolename will be “<your pennkey>-role”):

You can now run a command to generate Session tokens that last up to 12 hours.

This will add a new line to your ~/.aws/credentials file, but most importantly copy the PROFILE NAME; you’ll need it later. It should be something like 063038240025-zamechek-role .

You will now need to define a new ODBC connection in your ~/.odbc.ini file.

and add the following:

You should now be able to connect to this database using the instructions here. Feel free to test your connection:

You can reauthenticate by running:

Happy querying.