amazon-web-servicesaws-lake-formation

Is there an easy way to revoke all AWS Lake Formation permissions at once for a user?


I have a data lake with more than 2000 permissions that i want to revoke for some users and restart to granting again.

By the console the revoke is done one by one and it will take much time. Is there a way to revoke all permissions at once for a user?


Solution

  • This can be done programmatically:

    1. Call ListPermissions API to get all the granted permissions.
    2. Filter permissions granted to those users.
    3. Call BatchRevokePermissions API to revoke all permissions for those users.