amazon-web-servicesamazon-athenaaws-lake-formation

IAM and Lakeformation permission confusion- what permissions are required in order to do a successful athena query?


What are the permissions required on to be granted on an IAM level and via lakeformation if I want to successfully query a set of information that is governed by Lakeformation using athena?

Apologies for the relatively simple question as I could never find a clear answer.


Solution

  • I hope I can help here. I have been digging into lake formation at my company for almost a year and it's taken me down a long circuitous rabbit hole.

    You have two sets of permissions. Presuming IAMAllowedPrincipals is turned off on the governed table, you'll have to provide permissions to your IAM role via LF as a data lake administrator. You have to have administrator privileges.

    Photo hereenter image description here

    Once that permission is set, your IAM role needs to have the policy actions "lakeformation:GetDataAccess" and something like "athena:*". The athena:* is pretty broad but you can narrow it down from there.

    Even with broad athena access, if tables are governed by LF, you won't have access unless specifically perscribed by the LF administrator