本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
访问共享表的基础数据
假设 Amazon 账户 A 与账户 B 共享一个数据目录表,例如,通过向SELECT
账户 B 授予表上的授予选项。要使账户 B 中的委托人能够读取共享表的基础数据,必须满足以下条件:
-
账户 B 中的数据湖管理员必须接受共享。(如果账户 A 和账户 B 在同一个组织中,或者如果使用 Lake Formation 基于标签的访问控制方法进行授权,则无需这样做。)
-
数据湖管理员必须向主体重新授予账户 A 被授予的对共享表的 Lake Formation
SELECT
权限。 -
主体必须对表、包含该表的数据库和账户 A 数据目录拥有以下 IAM 权限。
注意
在以下 IAM 策略中:
-
<account-id-A>
替换为 Amazon 账户 A 的账户 ID -
<region>
替换为有效的区域。 -
<database>
替换为账户 A 中包含共享表的数据库的名称。 -
<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>
" } } } ] } -