Connectivity to Athena
Your host can connect to Athena with either an Athena public service endpoint or an Athena private endpoint. For more information on setting the endpoint, see Command line options and Boto3 documentation.

JDBC URL Example

jdbc:awsathena://AwsRegion=us-east-1;User=xxx;Password=xxx;S3OutputLocation=s3://data-bucket;MetadataRetrievalMethod=Query
  • Athena uses port 443 to connect to the host.
  • Athena's streaming API uses port 444 to stream the query results. When you use a JDBC/ODBC driver, Athena uses this port to stream the query results to the JDBC/ODBC driver installed on the client host. Therefore, unblock this port when you use a JDBC/ODBC driver to connect to Athena. If this port is blocked, your business intelligence tool might time out or fail to show query results when you run a query.
  • Use the appropriate JDBC connection URLs in your business tool configuration according to your private DNS configuration for your endpoint.
  • Be sure that the security group attached to your VPC endpoint allows traffic from the host where you installed the JDBC/ODBC driver.
  • Be sure that port 444 isn't blocked. If you use an AWS PrivateLink endpoint to connect to Athena, then be sure that the security group attached to the AWS PrivateLink endpoint is open to inbound traffic on port 444. Athena uses port 444 to stream query results. If port 444 is blocked, then the results aren't streamed back to your client host. In such situations, you might receive an error message similar to "[Simba][AthenaJDBC](100123) An error has occurred. Exception during column initialization". This can also cause the business intelligence tool to stop responding and not display the query results.
1
telnet athena.us-east-1.amazonaws.com 443
2
telnet glue.us-east-1.amazonaws.com 443
Copied!

Minimum Permissions

1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "VisualEditor0",
6
"Effect": "Allow",
7
"Action": [
8
"athena:StartQueryExecution",
9
"s3:ListBucketMultipartUploads",
10
"athena:GetQueryResultsStream",
11
"glue:GetTables",
12
"glue:GetPartitions",
13
"athena:GetQueryResults",
14
"glue:BatchGetPartition",
15
"s3:ListBucket",
16
"glue:GetDatabases",
17
"athena:ListQueryExecutions",
18
"s3:ListMultipartUploadParts",
19
"glue:GetTable",
20
"glue:GetDatabase",
21
"athena:GetWorkGroup",
22
"s3:PutObject",
23
"s3:GetObject",
24
"glue:GetPartition",
25
"glue:GetCatalogImportStatus",
26
"athena:StopQueryExecution",
27
"athena:GetQueryExecution",
28
"s3:GetBucketLocation",
29
"athena:BatchGetQueryExecution"
30
],
31
"Resource": [
32
"arn:aws:athena:*:<AWSAccountID>:workgroup/primary",
33
"arn:aws:s3:::<S3 bucket name>/*",
34
"arn:aws:s3:::<S3 bucket name>",
35
"arn:aws:glue:*:<AWSAccountID>:catalog",
36
"arn:aws:glue:*:<AWSAccountID>:database/<database name>",
37
"arn:aws:glue:*:<AWSAccountID>:table/<database name>/*"
38
]
39
}
40
]
41
}
Copied!
Last modified 20d ago