

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

# 將許可授予使用者和群組
<a name="grant-permissions-sso"></a>

您的資料湖管理員可以將許可授予 Data Catalog 資源 （資料庫、資料表和檢視） 上的 IAM Identity Center 使用者和群組，以便輕鬆存取資料。若要授予或撤銷資料湖許可，授予者需要下列 IAM Identity Center 動作的許可。
+ [DescribeUser](https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_DescribeUser.html)
+ [DescribeGroup](https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_DescribeGroup.html)
+ [DescribeInstance](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_DescribeInstance.html)

您可以使用 Lake Formation 主控台、 API 或 來授予許可 AWS CLI。

如需授予許可的詳細資訊，請參閱 [授予 Data Catalog 資源的許可](granting-catalog-permissions.md)。

**注意**  
您只能授予帳戶中資源的許可。若要在與您共用的資源上將許可串聯至使用者和群組，您必須使用 AWS RAM 資源共用。

------
#### [ AWS 管理主控台 ]

**將許可授予使用者和群組**

1. 登入 AWS 管理主控台，並在 https：//[https://console.aws.amazon.com/lakeformation/](https://console.aws.amazon.com/lakeformation/) 開啟 Lake Formation 主控台。

1. 在 Lake Formation 主控台的許可下選取**資料湖****許可**。

1. 選取**授予**。

1. 在**授予資料湖許可**頁面上，選擇 **IAM Identity Center** 使用者和群組。

1. 選取**新增**以選擇要授予許可的使用者和群組。  
![\[授予已選取 IAM Identity Center 使用者和群組的資料湖許可畫面。\]](http://docs.aws.amazon.com/zh_tw/lake-formation/latest/dg/images/identity-center-grant-perm.png)

1. 在**指派使用者和群組**畫面上，選擇要授予許可的使用者和/或群組。

   選取**指派**。  
![\[授予已選取 IAM Identity Center 使用者和群組的資料湖許可畫面。\]](http://docs.aws.amazon.com/zh_tw/lake-formation/latest/dg/images/identity-center-assign-users-groups.png)

1. 接著，選擇授予許可的方法。

   如需使用具名資源方法授予許可的說明，請參閱 [使用具名資源方法授予資料許可](granting-cat-perms-named-resource.md)。

   如需使用 LF-Tags 授予許可的說明，請參閱 [使用 LF-TBAC 方法授予資料湖許可](granting-catalog-perms-TBAC.md)。

1. 選擇您要授予許可的 Data Catalog 資源。

1. 選擇要授予的資料目錄許可。

1. 選取**授予**。

------
#### [ AWS CLI ]

下列範例顯示如何授予資料表上的 IAM Identity Center 使用者`SELECT`許可。

```
aws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=arn:aws:identitystore:::user/<UserId> \
--permissions "SELECT" \
--resource '{ "Table": { "DatabaseName": "retail", "TableWildcard": {} } }'
```

若要`UserId`從 IAM Identity Center 擷取，請參閱《IAM Identity Center API 參考》中的 [GetUserId](https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_GetUserId.html) 操作。

------