AWS Athena
Let agents run SQL with Amazon Athena over data in your S3 data lake.
Connect it with: API key. AWS Athena's own documentation: https://docs.aws.amazon.com/athena/latest/APIReference/API_ListWorkGroups.html.
What agents can do
Connect AWS Athena so the agents working your tasks can reach it. With it connected, they can:
- Run SQL over the tables in your Glue Data Catalog to answer questions about data in S3.
- List databases and tables and read their columns before writing a query.
- Read the result and status of a query run, and the reason it failed.
- Check that a partition for today's data exists.
Before you start
- An AWS account with Athena set up in a workgroup that has a query result location in S3.
- An IAM user for agents with athena:ListWorkGroups (the Test needs it), the Athena query actions, glue:Get* on the catalog, and S3 read access to the data plus write access to the result location. The AWS managed policy AmazonAthenaFullAccess covers Athena and Glue; add the S3 grants yourself.
- A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.
Connect with AWS Athena
Jaah connects to AWS Athena with an API key, not with a sign-in button.
Connect with an API key
Find each value first:
- Access key ID: AWS console > IAM > Users > the agents' user > Security credentials > Access keys > Create access key; choose Application running outside AWS and copy the Access key ID.
- Secret access key: Shown once, beside the access key ID, when the key is created; download the .csv if you need to keep it.
- Region (optional): The region your Athena tables and workgroup live in (the region picker at the top right of the Athena console).
- Workgroup (optional): Athena console > Workgroups; the workgroup agents run queries in, which sets where results are written.
Then add it to Jaah:
- In Jaah, open Secrets, select New, and pick the AWS Athena card.
- Name the secret and choose who can use it.
- Fill in Access key ID, Secret access key, Region, Workgroup.
- Select Save. Jaah tests the secret straight away (see Test the connection).
Jaah encrypts what you type and never shows it again — not to you, and not to an admin.
Use your own OAuth app
Not used: Jaah connects to AWS Athena with an API key, not through an OAuth app.
Test the connection
Select Test on the secret. Jaah calls AWS Athena's API once (POST https://athena.us-east-1.amazonaws.com/) with the stored values, and shows whether AWS Athena accepted it, or which value AWS Athena refused and the status it answered. Jaah also tests automatically when you save or reconnect.
The last result and its time stay on the secret's page, so you can see whether it still works without testing again.
Who can use it
Every secret has an owner, and the owner decides who can use it:
- Personal — only your own tasks can use it. This is the default.
- Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
- Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.
More on owners and access: How secrets work.
Use it in an agent session
An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:
org/<name>for an organization secret,projects/<project>/<name>for one attached to a project,me/<name>for your personal one.
A key connection hands the agent its fields: access_key_id, secret_access_key, region, workgroup.
Tell the agent in your task description which secret to use, for example “use the AWS Athena secret org/aws-athena”.
Manage, rotate or disconnect
Everything is on the secret's page under Secrets:
- Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at AWS Athena once the test passes. Steps: Replace or delete a secret.
- Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at AWS Athena's side too, revoke or delete the key at AWS Athena.
Limitations
- Jaah tests by listing workgroups in us-east-1. It proves the key, not access to a given table or region.
- Only long-lived IAM access keys are supported, not temporary (STS) credentials.
- Athena bills by data scanned. Set a per-query data limit on the agents' workgroup to cap cost.
- Agents can do only what the connected AWS Athena account allows.
Troubleshooting
Test says AWS Athena returned HTTP 400
Athena answers 400 for a missing permission (AccessDeniedException) and for an unknown key (UnrecognizedClientException). Check the key pair in IAM, then allow athena:ListWorkGroups on the user.
Test says AWS Athena rejected the secret access key (403)
The secret does not match the access key ID, or the key is deactivated. Create a new key pair and select Replace on the secret.
Queries fail with 'No output location provided'
Set a query result location on the workgroup (Workgroups > Edit > Query result configuration), or name a workgroup that has one.
Still stuck? Select Test and read the result: it names the value AWS Athena refused and the status it answered.
FAQ
Which region does it use?
The Test always uses us-east-1. Agents use the Region you set, so set it to where your tables live.
Can agents create tables?
Only if the IAM policy allows glue:CreateTable and the S3 writes. Leave those out to keep agents read-only.
Can Jaah or an admin see the key or token?
No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.
Can I connect more than one AWS Athena account?
Yes. Add one secret per account, each with its own name, and tell the agent which one to use.