amazon s3 - Issues querying Athena table where source bucket is from a different account -


i have created athena tables files in s3 bucket not belong account. tables partitioned , when run msck repair table command successful , shows partitions not in metastore. when query table gives following error

"your query has following error(s):

insufficient permissions execute query.

this query ran against "......" database, unless qualified query. please post error message on our forum or contact customer support query id: ..........."

what issue here?

the issue describing caused wrongly set access policy. guess, athena account has listbucket privilege, not getobject.

as sample, used following bucket policy test cross account access.

{   "version": "2012-10-17",   "statement": [     {       "action": [         "s3:getobject",         "s3:listbucket"       ],       "effect": "allow",       "resource": ["arn:aws:s3:::bucketname","arn:aws:s3:::bucketname/*"],       "principal": "*"     }   ] } 

please change principal in sample or data public whole internet.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -