Amazon Athena
  • 24 Mar 2023
  • 1 Minute to read
  • Dark

Amazon Athena

  • Dark

Article summary


In this article we will discuss how to connect an Amazon Athena database to Preset.

Allowlist Preset IPs

Preset Cloud runs on four regions. For Preset to access your data, first thing you need to do is to add region based Preset IP addresses to your Inbound and Outbound firewall rules.

us-west-2 (us1a)us-east-1 (us2a)eu-north-1 (eu5a)ap-northeast-1 (ap1a)

If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this:, where us2a means it is in us-east-1.

Connect Database to Preset

  1. Navigate to Settings > Database Connections
  2. Click + Database — check out Connecting your Data if you need help with this step.
  3. In the Connect a database window, select the Amazon Athena card from the drop-down.


Define Display Name and URI

  • In the Display Name field, enter a schema nickname for display in the Preset environment.
  • In the SQLAlchemy URI field, enter the unique URI based on the following syntax, being careful to enter the relevant token, host, and schema name details.
awsathena+pandas://<aws_access_key_id>:<aws_secret_access_key>@athena.<region_name><schema_name>?s3_staging_dir=s3://<s3 bucket>/&work_group=<work group>
  • The screen should similar to the following:


Make the Connection

  • Next, select Test Connection.
    • A notification message will appear indicating success or failure. If the test worked, then go ahead and select Connect to finalize the database connection.

Was this article helpful?