DyfanJones / RAthena

Connect R to Athena using Boto3 SDK (DBI Interface)
https://dyfanjones.github.io/RAthena/
Other
35 stars 6 forks source link

bug fix: glue call aborting list table when user doesn't have s3 permissons. #120

Closed DyfanJones closed 3 years ago

DyfanJones commented 3 years ago

Update RAthena with noctua identified bug fixes: https://github.com/DyfanJones/noctua/pull/106#issue-493022689

An issue connected to the Lake Formation service in AWS appeared:

Lake Formation can be used to share content from one AWS account's glue catalog to another account.

The problem arises, when:

A Lake formation share is created on account A A resource link is created on account B The share on acc A is removed leaving an 'oprhaned' resource link

Now, when a user tries to establish a noctua/Athena connection, an error occurs, as the user on account B doesn't have >permission to get_tables on account B:s data catalog anymore.

This pull request makes the get_tables error tolerant so that if access is denied, an empty list of tables is put forward.

Probably the multiple tryCatche's are unnecessary now, but I hope this at least outlines the idea how one could address the issue.

Br, Ossi