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

# AWS Athena

> Connect AWS Athena to Ryft for query history analysis and usage-based Iceberg optimizations. Set up IAM roles via CloudFormation or manually.

<Note>
  The best way to set up Athena integration is by running CloudFormation/Terraform directly from the
  [AWS Role Setup](/integrations/aws-role-setup#option-a%3A-create-iam-role-with-policies-attached-with-cloudformation-%2F-terraform).

  For manual setup, proceed below.
</Note>

### Manual Setup

Follow the manual steps to create a role and attach the Athena policy to it, as described [here](/integrations/aws-role-setup#aws-athena):

1. Create the "**Ryft-ControlPlaneRole**" (or reuse if already exists)
2. Create and attach the Athena access policy

<Check>
  You are done! Locate the ARN of the role you have just created ("**Ryft-ControlPlaneRole**") and provide it to Ryft.
  The ARN should look similar to: `arn:aws:iam::<account>:role/Ryft-ControlPlaneRole`
</Check>
