# Amazon Athena

### Setting up your Amazon Athena

The first thing you’ll need to do is create an IAM user that will have permission to run queries with Amazon Athena and access the S3 buckets that contain your data.

To configure your Amazon Athena with the necessary permission, please navigate to <https://docs.aws.amazon.com/athena/latest/ug/setting-up.html>

### Creating Athena Data Source <a href="#create-athena-data-source" id="create-athena-data-source"></a>

After your Amazon Athena is configured, the next step is to create and add the Amazon Athena data source to your Apica Ascent.

![Selecting Athena from Data Source](/files/z1Cv8Cq3o2xB5sBIeXgD)

The next step is to fill out the details using the information from the previous step:

* **AWS Access Key** and **AWS Secret Key** are the ones from the previous step.
* **AWS Region** is the region where you use Amazon Athena.
* **S3 Staging Path** is the bucket Amazon Athena uses for staging/query results, you might have created it already if you used Amazon Athena from the AWS console - simply copy the same path.

![Adding a new Athena Data Source](/files/RVyVBjigppmkGUYpFOmp)

\
That's it. Now navigate to the Query editor to query your data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/data-sources/aws/amazon-athena.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
