We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

AWS Athena Connections

sabihaS
7 - Meteor

Hello Team,

 

I am trying to connect to AWS Athena. I have tested Athena ODBC connection and its successful. However, When I try to connect to Athena from Alteryx I get this error 

"Error: Input Data (1): Error SQLPrepare: [Simba][Athena] (1040) An error has been thrown from the AWS Athena client. Athena Error No: 15, HTTP Response Code: 400, Exception Name: AccessDeniedException, Error Message: You are not authorized to perform: athena:StartQueryExecution on the resource. After your AWS administrator or you have updated your permissions, please try again. [Execution ID: ]"

 

I have checked with AWS admin and they confirmed that the role which I am using already had StartQueryExecution permission. Also, I noticed that in 'Visual Query Builder' I can see all the Databases and there tables\views but when I click any table\view its empty (no metadata).

 

Please can someone advise.

 

Thank you.

 

8 REPLIES 8
Deano478
12 - Quasar

@sabihaS has your AWS admin set up a custom work group in which the Athena queries will run?

sabihaS
7 - Meteor

@Deano478 Yes, they did and I am using that same workgroup in ODBC connection as well.

apathetichell
20 - Arcturus

My hunch here is that your admin is wrong --- or that Alteryx requires some additional permissions which may not be related to performing the query -> but are related to seeing certain objects.

 

A few things:

1) can you confirm you have access to the S3?

2) can you run the query via CLI -> https://docs.aws.amazon.com/cli/latest/reference/athena/start-query-execution.html (ask your admin/AWS team for the CLI to run) - if you auth locally?

 

3) if 1 and 2 are true---> check out the list here --> https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonathena.html -- Alteryx may require a Get/List permission not in your IAM policy.

Deano478
12 - Quasar

@sabihaS to my knowledge from using Athena in Alteryx before it worked when I assigned it StartQueryExecution, GetQueryExecution, GetQueryResults permissions also does your Athena DB have files in s3 that is reads from?

sabihaS
7 - Meteor

@apathetichell Thank you. Yes, I have access to S3 and for point 2 and 3 I will check tomorrow as AWS admin left for the day and will confirm the outcome. 

sabihaS
7 - Meteor

@Deano478 Thank you. I will check with AWS admin about other 2 permissions and will post the outcome. Yes Athena DBs do have files in S3 from where they are loaded.

Deano478
12 - Quasar

ahh okay if you are using s3 you may also need to include ListBucket and GetObject permissions for S3

sabihaS
7 - Meteor

@Deano478 Thank you. Adding permissions GetQueryExecution, GetQueryResult do the trick. Its working now.

Labels
Top Solution Authors