存取共用資料表的基礎資料 - AWS Lake Formation

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

存取共用資料表的基礎資料

假設 AWS 帳戶 A 與帳戶 B 共用 Data Catalog 資料表,例如,SELECT透過將資料表上的授予選項授予帳戶 B。若要讓帳戶 B 中的主體能夠讀取共用資料表的基礎資料,必須符合下列條件:

  • 帳戶 B 中的資料湖管理員必須接受共用。(如果帳戶 A 和 B 位於相同組織中,或使用 Lake Formation 標籤型存取控制方法授予,則不需要這麼做。)

  • 資料湖管理員必須向主體重新授予共用資料表上帳戶 A 的 Lake Formation SELECT許可。

  • 主體必須在資料表、包含它的資料庫以及帳戶 A Data Catalog 上具有下列IAM許可。

    注意

    在下列IAM政策中:

    • Replace (取代) <account-id-A> AWS 帳戶 A 的帳戶 ID。

    • Replace (取代) <region> 具有有效區域。

    • Replace (取代) <database> 帳戶 A 中包含共用資料表的資料庫名稱。

    • Replace (取代) <table> 共用資料表的名稱。

    { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "glue:GetTable", "glue:GetTables", "glue:GetPartition", "glue:GetPartitions", "glue:BatchGetPartition", "glue:GetDatabase", "glue:GetDatabases" ], "Resource": [ "arn:aws:glue:<region>:<account-id-A>:table/<database>/<table>", "arn:aws:glue:<region>:<account-id-A>:database/<database>", "arn:aws:glue:<region>:<account-id-A>:catalog" ] }, { "Effect": "Allow", "Action": [ "lakeformation:GetDataAccess" ], "Resource": [ "*" ], "Condition": { "StringEquals": { "lakeformation:GlueARN":"arn:aws:glue:<region>:<account-id-A>:table/<database>/<table>" } } } ] }