Lake Formation LF-TBAC Permission Issue

0

Hi,

I've shared a table via LF-TBAC from a source account A with a target account B. I have created a resource link between the target and source accts and the source db and table was picked up by the LF UI. When I open Athena in acct B, the target db and table are selectable but when I try to preview the data I get the following permissions error;

com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 9EZCHM2TCN8KP4SY; S3 Extended Request ID: UsQMulZBgQJ6UdpPvtC/076XmaZEVhrzefxV/VU1T35nv7j9RcULDAECuIYGYg1qE3xzHqGHXWtyXzpxtefhrg==; Proxy: null), S3 Extended Request ID: UsQMulZBgQJ6UdpPvtC/076XmaZEVhrzefxV/VU1T35nv7j9RcULDAECuIYGYg1qE3xzHqGHXWtyXzpxtefhrg== (Bucket: mytime-dynamic-data, Key: all_taa_data/) This query ran against the "ipde" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 63f357ea-d788-4994-b379-4484cdfff4e2

I have permissions to generate the table DDL.

Any ideas on what is causing the problem?

Thanks

Al

asked 3 months ago69 views
1 Answer
0

Hello Al,

Thanks for your question. Considering you shared the resources from Account A to Account B and created the source links in Account B and you are using the resource links in Amazon Athena to query the data, probably you need to grant permission in Account B to the Data Location as well. Please could you confirm the following items?

Question 1: In Account A, Did you register the Data Lake location for bucket "mytime-dynamic-data" using a Service Role? Question 2: In Account B, did you share the Data Location "mytime-dynamic-data" with the Account B? You can perform the following steps if the answer of Question 1 is yes:

a) Open AWS Lake Formation in Account A

b) After open the AWS Lake Formation, navigate to the option "Data Location" available in the left pane

c) After open "Data Location", click on "Grant" button in the right side

Enter image description here

d) Share the "Data Location" with Account B with the "Grantable" option enabled. The "Data Location" should be the Amazon S3 bucket registered in "Data Lake Location":

Enter image description here

e) If you were able to share successfully the "Data Location", open the AWS Console related to Account B and navigate to AWS Lake Formation

f) In AWS Lake Formation in Account B, navigate to the option "Data Location". After open "Data Location", click on "Grant" button in the right side.

Enter image description here

g) Grant the "Data Location" to the Principal in AWS Account B that needs to query the data in Amazon Athena. Make sure to fill the options below carefully:

      - Storage locations: fill with the Amazon S3 bucket path that you shared from Account A with Account B
      - Registered account location: fill with AWS Account A number (because the Amazon S3 is registered in 
         AWS Account A)

h) Access Amazon Athena in Account B and try to query the data again. Probably if will solve the permission issue

Let me know.

AWS
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions