Connecting to AWS Athena requires an IAM user or role with sufficient permissions to query Athena and access the associated S3 buckets and Glue Data Catalog.
Note: The metadata extraction is available only with
Advanced Connectivity Bundle (ACB) entitlement.
Required IAM permissions
The IAM user or role whose Access Key ID and Secret Access Key are used for the connection must have the following permissions granted via an IAM policy:
Athena permissions
athena:GetDatabaseathena:GetTableMetadataathena:ListDatabasesathena:ListTableMetadataathena:StartQueryExecutionathena:GetQueryExecutionathena:GetQueryResultsathena:StopQueryExecution
S3 permissions (query results bucket)
s3:GetObjects3:PutObjects3:DeleteObjects3:ListBuckets3:GetBucketLocation
These permissions must be granted on the S3 bucket configured in the S3 Location field of the connection, and on any S3 buckets that back the Athena tables you want to catalog.
AWS Glue Data Catalog permissions
glue:GetDatabaseglue:GetDatabasesglue:GetTableglue:GetTablesglue:GetPartitionglue:GetPartitions
Creating an IAM policy
- Sign in to the AWS Management Console and navigate to IAM.
- Select Policies and click Create policy.
- Switch to the JSON tab and paste a policy granting the permissions listed above.
- Name the policy (for example,
DIS-Athena-ReadPolicy) and save it. - Attach the policy to the IAM user whose credentials will be used for the connection.
- From the IAM user's Security credentials tab, create an Access key and record the Access Key ID and Secret Access Key.