Prerequisites
Before you start, you will need the following from AWS:- Region — where your Athena workgroup and Glue catalog live (e.g.
us-east-1) - Access Key ID and Secret Access Key — for an IAM user or service account
- S3 output location — an S3 URI Athena writes query results to (e.g.
s3://my-bucket/athena-results/) - Database — the Glue database holding the tables you want to query
- Data catalog (optional, defaults to
AwsDataCatalog) - Workgroup (optional, defaults to
primary)
Athena has no username or password. The IAM key pair is the equivalent — the
official Athena JDBC driver maps the Access Key ID to
User and the Secret
Access Key to Password, and Upsolve follows the same convention.- Go to the AWS Management Console and open Athena. Confirm the region shown in the top-right corner — this is the region you will enter in Upsolve.
- Under Query editor → Settings, check the Location of query result. If it is blank, set it to an S3 prefix you control. This is your S3 output location.
- In Data sources, note the data catalog (usually
AwsDataCatalog) and the database containing your tables. If your tables are not yet catalogued, run an AWS Glue crawler over your S3 data first. - Open IAM and create (or reuse) a user for Upsolve, then create an access key for it. Save the secret when it is shown — AWS will not display it again.
IAM permissions
Attach a policy granting the Upsolve key pair at least:athena:StartQueryExecution,athena:GetQueryExecution,athena:GetQueryResultsglue:GetDatabase,glue:GetDatabases,glue:GetTable,glue:GetTables,glue:GetPartition,glue:GetPartitions— for the databases you exposes3:GetObjectands3:PutObjecton the output locations3:GetObjectands3:ListBucketon the buckets your tables read from
Connecting Amazon Athena to Upsolve
Now that you have your requirements, you can connect it to Upsolve using the following steps:- Navigate to the connections page in Upsolve.
- Click to add a new connection and select Athena as your data source type.
- Enter a name for your connection, then fill in the details:
- Region
- Access Key ID
- Secret Access Key
- S3 output location
- Database
- Data catalog (optional)
- Workgroup (optional)
- Click “Test & Create Connection” to validate the credentials and create your Athena connection.
Things to know about Athena
- Athena uses Trino/Presto SQL. Identifiers are double-quoted, and date handling uses
date_truncanddate_formatrather than their Postgres or MySQL equivalents. - Queries are billed per byte scanned. Upsolve therefore disables automatic selectable-column detection for Athena connections — detecting it would run a
COUNTper table on every metadata refresh. Partitioning your tables and filtering on the partition keys is the most effective way to control cost. - Executions are asynchronous. Upsolve polls until a query completes and gives up after 120 seconds.
- One database per connection. Unlike other connection types, the database field cannot be a comma-separated list, because Athena scopes
information_schemato a single database at a time. Create a separate connection for each database you need.
The specific steps for connecting Amazon Athena may vary based on your unique
setup. If you encounter any difficulties or have questions, please don’t
hesitate to contact our Support Team for assistance.