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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -