Skip to Content
DestinationsAthenaSetup Instructions

AWS Athena Setup Instructions

Prerequisites

  • An AWS account with Athena enabled in your region
  • A Glue Data Catalog database with tables pointing to S3 data
  • An S3 bucket for Athena query results
  • IAM credentials with Athena and S3 permissions

Step 1: Create an S3 Output Bucket

Athena requires an S3 location to store query results:

  1. Go to S3 in the AWS Console
  2. Create a bucket (e.g. my-athena-results)
  3. Note the full path: s3://my-athena-results/vendo/

Step 2: Create an IAM Policy

Create a policy with the minimum required permissions:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "athena:StartQueryExecution", "athena:GetQueryExecution", "athena:GetQueryResults", "athena:StopQueryExecution" ], "Resource": "arn:aws:athena:*:*:workgroup/primary" }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::my-athena-results", "arn:aws:s3:::my-athena-results/*" ] }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::my-data-lake-bucket", "arn:aws:s3:::my-data-lake-bucket/*" ] }, { "Effect": "Allow", "Action": [ "glue:GetTable", "glue:GetTables", "glue:GetDatabase", "glue:GetDatabases", "glue:GetPartitions" ], "Resource": "*" } ] }

Replace bucket names with your actual S3 buckets.

Step 3: Create an IAM User

  1. Go to IAM > Users > Create user
  2. Attach the policy from Step 2
  3. Create an access key (programmatic access)
  4. Save the Access Key ID and Secret Access Key

Step 4: Configure in Vendo

  1. Go to Sources > Add Source > AWS Athena
  2. Enter your credentials:
FieldDescription
AWS RegionRegion where Athena runs (e.g. us-east-1)
DatabaseGlue Data Catalog database name
S3 Output LocationS3 path for query results (e.g. s3://my-athena-results/vendo/)
CatalogData catalog name (optional, defaults to AwsDataCatalog)
Access Key IDIAM user access key
Secret Access KeyIAM user secret key
  1. Click Test Connection
  2. Once verified, click Save

Troubleshooting

Query Failed — Access Denied

  • Verify IAM permissions include Athena, S3 (both data and results buckets), and Glue
  • Check that the S3 output location bucket exists and is writable
  • Ensure the IAM user has s3:GetObject on the source data bucket

Database Not Found

  • Verify the Glue Data Catalog database name is correct
  • Check that the database exists in the same region as your Athena configuration
  • Run SHOW DATABASES in the Athena console to list available databases

Slow Queries

  • Athena scans data in S3 — use partitioned tables and columnar formats (Parquet, ORC) for best performance
  • Queries against CSV or JSON data will scan more bytes and cost more
  • Consider using Athena workgroups with query limits for cost control
Last updated on