Skip to main content

Athena configuration

To add an Athena data source, you only need the credentials from an user with the permission athena:StartQueryExecution enabled and a few details of the data you want to query from Latitude. This is how you can do it:

1. Create a new data source in Latitude

First, you have to create a new data source in Latitude to connect to Athena.

  1. Go to Settings (direct link).

  2. Access the Data sources section.

  3. Click on Add new data source.

  4. Select Athena.

info

If your data source has a firewall, you can whitelist our static IP: 18.193.205.15

2. Set up the Athena configuration

  1. Fill in all the required fields.

    • Alias → (Required) The name you'll see for this source in Latitude. This doesn’t affect anything in your database.

    • Access Key → (Required) The credential which grants you access to your resources in Amazon Web Services. Check here how to get your Access Key.

      ☝️ Remember that the connection needs an Access Key from an user with the permission athena:StartQueryExecution enabled.

    • Secret Access Key → (Required) The password to authenticate you to access your resources in Amazon Web Services. Remember that the Check here how to get your Secret Access Key.

    • Region → (Required) The location where your Athena is configured. The format is [continent]-[position]-[number]. For example: eu-central-1.

      1. Open Athena (link).
      2. Click the location at the top right.
      3. Check the location selected at the right. You will see the region.
    • Output Location → (Optional) The location in Amazon S3 where your query results are stored. Find here how to specify an Output Location.

    • Catalog → (Required) The repository's name where the data or databases you want to query are. Usually is AwsDataCatalog. Check how to find your Catalog:

      1. Open Athena (link).
      2. In Data Source, check the Catalog that contains the database you want to use.
    • Database → (Required) The database's name where the tables you want to query in Latitude are.

      1. Open Athena (link).
      2. In Database, select the one that contains the tables you want to use.
  2. Save the configuration

  3. Now, it's time to check that everything was set up correctly. Go to a project, add an Athena data source and check that you get results.

Get the Access Key and Secret Access Key

To get the Access Key, you need permissions to use the IAM console. Otherwise, request permissions or ask for this information to the admin of your AWS account.

  1. Open the IAM console at https://console.aws.amazon.com/iam/.
  2. On the navigation menu, choose Users.
  3. Choose your IAM user name (not the check box).
  4. Open the Security credentials tab and choose the Create access key.
  5. To see the new access key, choose Show. Your credentials resemble the following:
    1. Access key ID example: AKIAIOSFODNN7EXAMPLE
    2. Secret access key example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Error when configuring the Athena connection

If you get an error after configuring the Athena connection, check that the credentials from the user included in the configuration have enabled the athena:StartQueryExecution permission.

Contact the admin of your Amazon Web Services account to check that the user has the permission is enabled.