I have setup AWS Athena DB and and can access it using AWS web console. select * from "Schema"."test_table" limit 10;
Its giving me 10 records as expected.
Then I have setup DBVisualizer database tool in EC2 instance in same VPC. Created a new Data Driver using driver manager for Athena access in DBVis. Using : SimbaAthenaJDBC42.jar
and created a connection (AthenaConn) using the above created driver and below URL :
jdbc:awsathena://athena..amazonaws.com:443;s3_staging_dir=s3://<dir_of_queryResult>/;AwsCredentialProviderClass=com.simba.athena.amazonaws.auth.InstanceProviderCredentialProvider;
"I am using InstanceProviderCredentialProvider , thats why I am not prividng db username and password (access/secret keys) while creating connection"
Connection successfully created and I can see My database and schema and and table has appeared in DBViz
- AthenaConn AwsDataCatalog default EXTERNAL_TABLE test_table
Now I am executing query on the test_table to select all records (Select * from "default"."test_table")
Error : [Code:100123, SQL state: HY000] [Simba][AthenaJDBC][100123] An error has occured. Exception during column intialization. Details: null ( service :AthenaStreamingService; status code:403 , error Code : null; Request Id : nul; Proxy:proxy)[Execution Id : ...]
Note: My Ec2 instace has IAM role with following polices attached S3(full access), fullAthenaAccess AWSQuickSightAthenaAccess
Ec2 instace has SecurityGroup inbound rule (custom/TCP 444 port/ ..0.0/20) and same privaeVPCEndpoint securityGroup also has inbound rule open to 444 port (custom/TCP ..0.0/20)[* is a number in my case]