> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Athena

export const IntegrationSuccess = ({integrationName}) => {
  return <p>
      <b>{integrationName} connected!</b><br />You can now use{" "}
      <a href="/building-with-clark">Clark to build</a> with {integrationName}.
    </p>;
};

export const Alert = ({type, title, children}) => {
  const variant = ["info", "success", "warning", "danger", "note"].includes(type) ? type : "note";
  return <div className={`alert alert--${variant}`}>
      <div className="alert-icon" />
      <div className="alert-content">
        {title && <div className="alert-title">{title}</div>}
        <div className="alert-body">{children}</div>
      </div>
    </div>;
};

Amazon Athena serves as an interactive query service, facilitating fast analysis of data directly within Amazon S3. Connect Superblocks to your Athena instance to access your S3 data and harness the power of SQL to execute ad-hoc queries with speed.

## Setting up Amazon Athena

### 1. Add integration

<p>
  Select <strong>Amazon Athena</strong> from the{" "}
  <a href="https://app.superblocks.com/integrations/athena">integrations page</a>.
</p>

### 2. Configure settings

Fill out the form with the following settings:

| Setting | Required | Description |
| - | - | - |
| Name | <span className="table-checkmark">✓</span> | Name that will be displayed to users when selecting this integration in Superblocks |
| Database Name | <span className="table-checkmark">✓</span> | Name of the database in Amazon Athena to interact with |
| Region | <span className="table-checkmark">✓</span> | AWS region where the database is hosted, e.g. <i>us-east-1</i> |
| Access Key ID | <span className="table-checkmark">✓</span> | [Access key ID](https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html) for your AWS account |
| Secret Key | <span className="table-checkmark">✓</span> | [Secret access key](https://docs.aws.amazon.com/powershell/latest/userguide/pstools-appendix-sign-up.html) for your AWS account |
| Workgroup Name | <span className="table-x">✗</span> | Name of the [Workgroup](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html) used for permissions |
| S3 Output Location | <span className="table-x">✗</span> | The [query result location](https://docs.aws.amazon.com/athena/latest/ug/querying.html#query-results-specify-location) to use in Athena |
| IAM Role ARN | <span className="table-x">✗</span> | ARN of the role for Superblocks to assume for accessing Athena resources |

### 3. Test and save

Click **Test Connection** to check that Superblocks can connect to the data source.

<Alert type="info">
  If using Superblocks Cloud, add these <a href="/enterprise/security/overview#ip-addresses">Superblocks IPs</a> to your allowlist (not necessary for Hybrid or Cloud-Prem deployments).
</Alert>

After connecting successfully, click **Create** to save the integration.

### 4. Set data tags

Optionally, configure different data tags for [separate development environments](/development-lifecycle/build/data-tags).

<Alert type="success">
  <IntegrationSuccess integrationName="Amazon Athena" />
</Alert>

## Creating Amazon Athena steps

Connect to your Athena integration from Superblocks by creating steps in Application APIs, Workflows and Scheduled Jobs. You can configure a Superblocks Athena integration with read only, read/write, or write only IAM Users. You can then configure a Superblocks Athena step to read from a database, as well as modify/delete data.

## Troubleshooting

Check out our guide on [common errors across database integrations](/integrations/troubleshooting/troubleshooting-databases). If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at [help@superblocks.com](mailto:help@superblocks.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.