

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

# 設定使用 Amazon DataZone 管理主控台所需的 IAM 許可
<a name="create-iam-roles"></a>

若要存取和設定 Amazon DataZone 網域、藍圖和使用者，以及建立 Amazon DataZone 資料入口網站，您必須使用 Amazon DataZone 管理主控台。

 您必須完成下列程序，才能為想要使用 Amazon DataZone 管理主控台的任何使用者、群組或角色設定必要和/或選用的許可。

**Topics**
+ [將必要和選用政策連接到 Amazon DataZone 主控台存取的使用者、群組或角色](#attach-managed)
+ [建立 IAM 許可的自訂政策，以啟用 Amazon DataZone 服務主控台簡化的角色建立](#create-custom-to-manage-EZCRZ)
+ [建立自訂政策以取得許可，以管理與 Amazon DataZone 網域相關聯的帳戶](#create-custom-to-manage-associated-account)
+ [（選用） 建立 AWS Identity Center 許可的自訂政策，以新增和移除對 Amazon DataZone 網域的 SSO 使用者和 SSO 群組存取權](#create-custom-to-manage-add-remove-sso)
+ [（選用） 將您的 IAM 主體新增為金鑰使用者，以使用 AWS 來自 Key Management Service (KMS) 的客戶受管金鑰建立 Amazon DataZone 網域](#create-custom-to-manage-kms)

## 將必要和選用政策連接到 Amazon DataZone 主控台存取的使用者、群組或角色
<a name="attach-managed"></a>

完成下列程序，將必要和選用的自訂政策連接至使用者、群組或角色。如需詳細資訊，請參閱[AWS Amazon DataZone 的 受管政策](security-iam-awsmanpol.md)。

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

1. 在導覽窗格中，選擇**政策**。

1. 選擇要連接至使用者、群組或角色的下列政策。
   + 在政策清單中，選取 **AmazonDataZoneFullAccess** 旁的核取方塊。您可用**篩選**功能表和搜尋方塊來篩選政策清單。如需詳細資訊，請參閱[AWS 受管政策： AmazonDataZoneFullAccess](security-iam-awsmanpol-AmazonDataZoneFullAccess.md)。
   +  [（選用） 建立 IAM 許可的自訂政策，以啟用 Amazon DataZone 服務主控台簡化的角色建立。](#create-custom-to-manage-EZCRZ)
   + [（選用） 為 AWS Identity Center 建立自訂政策，以新增和移除對 Amazon DataZone 網域的 SSO 使用者和 SSO 群組存取權。](#create-custom-to-manage-add-remove-sso)

1. 選擇 **Actions (動作)**，然後選擇 **Attach (連接)**。

1. 選擇您要連接政策的使用者、群組或角色。您可用**篩選**功能表和搜尋方塊來篩選主體實體清單。選擇使用者、群組或角色後，選擇**連接政策**。

## 建立 IAM 許可的自訂政策，以啟用 Amazon DataZone 服務主控台簡化的角色建立
<a name="create-custom-to-manage-EZCRZ"></a>

完成下列程序來建立自訂內嵌政策，以擁有必要的許可，讓 Amazon DataZone 代表您在 AWS 管理主控台中建立必要的角色。

**注意**  
如需設定許可以允許建立服務角色的最佳實務資訊，請參閱 https：//[https://docs.aws.amazon.com/IAM/latest/UserGuide/id\_roles\_create\_for-service.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html)。

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

1. 在導覽窗格中，選擇**群組**或**使用者**。

1. 在清單中，選擇要內嵌政策的使用者或群組名稱。

1. 選擇 **Permissions (許可)** 索引標籤，並在必要時，展開 **Permissions policies (許可政策)** 部分。

1. 選擇**新增許可**和**建立內嵌政策**連結。

1. 在**建立政策**畫面上的政策**編輯器**區段中，選擇 **JSON**。

   使用下列 JSON 陳述式建立政策文件，然後選擇**下一步**。

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "iam:CreatePolicy",
                   "iam:CreateRole"
               ],
               "Resource": [
                   "arn:aws:iam::*:policy/service-role/AmazonDataZone*",
                   "arn:aws:iam::*:role/service-role/AmazonDataZone*"
               ]
           },
           {
               "Effect": "Allow",
               "Action": "iam:AttachRolePolicy",
               "Resource": "arn:aws:iam::*:role/service-role/AmazonDataZone*",
               "Condition": {
                   "ArnLike": {
                       "iam:PolicyARN": [
                           "arn:aws:iam::aws:policy/AmazonDataZone*",
                           "arn:aws:iam::*:policy/service-role/AmazonDataZone*"
                       ]
                   }
               }
           }
       ]
   }
   ```

------

1. 在**檢閱政策**畫面上，輸入政策的名稱。當您滿意時，選擇 **Create policy (建立政策)**。確認畫面頂端的紅色方塊未出現任何錯誤。如出現任何錯誤，請加以修正。

## 建立自訂政策以取得許可，以管理與 Amazon DataZone 網域相關聯的帳戶
<a name="create-custom-to-manage-associated-account"></a>

 完成下列程序，以建立自訂內嵌政策，讓關聯 AWS 帳戶中具備必要許可，以列出、接受和拒絕網域的資源共用，然後在關聯帳戶中啟用、設定和停用環境藍圖。若要啟用藍圖組態期間可用的選用 Amazon DataZone 服務主控台簡化角色建立，您也必須 [建立 IAM 許可的自訂政策，以啟用 Amazon DataZone 服務主控台簡化的角色建立](#create-custom-to-manage-EZCRZ)。

**注意**  
如需設定許可以允許建立服務角色的最佳實務資訊，請參閱 https：//[https://docs.aws.amazon.com/IAM/latest/UserGuide/id\_roles\_create\_for-service.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html)。

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

1. 在導覽窗格中，選擇**群組**或**使用者**。

1. 在清單中，選擇要內嵌政策的使用者或群組名稱。

1. 選擇 **Permissions (許可)** 索引標籤，並在必要時，展開 **Permissions policies (許可政策)** 部分。

1. 選擇**新增許可**和**建立內嵌政策**連結。

1. 在**建立政策**畫面上的政策**編輯器**區段中，選擇 **JSON**。使用下列 JSON 陳述式建立政策文件，然後選擇**下一步**。

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "datazone:ListEnvironmentBlueprintConfigurations",
                   "datazone:PutEnvironmentBlueprintConfiguration",
                   "datazone:GetDomain",
                   "datazone:ListDomains",
                   "datazone:GetEnvironmentBlueprintConfiguration",
                   "datazone:ListEnvironmentBlueprints",
                   "datazone:GetEnvironmentBlueprint",
                   "datazone:ListAccountEnvironments",
                   "datazone:DeleteEnvironmentBlueprintConfiguration"
               ],
               "Resource": "*"
           },
           {
               "Effect": "Allow",
               "Action": "iam:PassRole",
               "Resource": [
                   "arn:aws:iam::*:role/AmazonDataZone",
                   "arn:aws:iam::*:role/service-role/AmazonDataZone*"
               ],
               "Condition": {
                   "StringEquals": {
                       "iam:passedToService": "datazone.amazonaws.com"
                   }
               }
           },
           {
               "Effect": "Allow",
               "Action": "iam:AttachRolePolicy",
               "Resource": "arn:aws:iam::*:role/service-role/AmazonDataZone*",
               "Condition": {
                   "ArnLike": {
                       "iam:PolicyARN": [
                           "arn:aws:iam::aws:policy/AmazonDataZone*",
                           "arn:aws:iam::*:policy/service-role/AmazonDataZone*"
                       ]
                   }
               }
           },
           {
               "Effect": "Allow",
               "Action": "iam:ListRoles",
               "Resource": "*"
           },
           {
               "Effect": "Allow",
               "Action": [
                   "iam:CreatePolicy",
                   "iam:CreateRole"
               ],
               "Resource": [
                   "arn:aws:iam::*:policy/service-role/AmazonDataZone*",
                   "arn:aws:iam::*:role/service-role/AmazonDataZone*"
               ]
           },
           {
               "Effect": "Allow",
               "Action": [
                   "ram:AcceptResourceShareInvitation",
                   "ram:RejectResourceShareInvitation",
                   "ram:GetResourceShareInvitations"
               ],
               "Resource": "*"
           },
           {
               "Effect": "Allow",
               "Action": [
                   "s3:ListAllMyBuckets",
                   "s3:ListBucket",
                   "s3:GetBucketLocation"
               ],
               "Resource": "*"
           },
           {
               "Effect": "Allow",
               "Action": "s3:CreateBucket",
               "Resource": "arn:aws:s3:::amazon-datazone*"
           }
       ]
   }
   ```

------

1. 在**檢閱政策**畫面上，輸入政策的名稱。當您滿意時，選擇 **Create policy (建立政策)**。確認畫面頂端的紅色方塊未出現任何錯誤。如出現任何錯誤，請加以修正。

## （選用） 建立 AWS Identity Center 許可的自訂政策，以新增和移除對 Amazon DataZone 網域的 SSO 使用者和 SSO 群組存取權
<a name="create-custom-to-manage-add-remove-sso"></a>

完成下列程序來建立自訂內嵌政策，以擁有必要許可，以新增和移除對 Amazon DataZone 網域的 SSO 使用者和 SSO 群組存取權。

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

1. 在導覽窗格中，選擇**群組**或**使用者**。

1. 在清單中，選擇要內嵌政策的使用者或群組名稱。

1. 選擇 **Permissions (許可)** 索引標籤，並在必要時，展開 **Permissions policies (許可政策)** 部分。

1. 選擇**新增許可**和**建立內嵌政策**。

1. 在**建立政策**畫面上的政策**編輯器**區段中，選擇 **JSON**。

   使用下列 JSON 陳述式建立政策文件，然後選擇**下一步**。

------
#### [ JSON ]

****  

   ```
   {
     "Version":"2012-10-17",		 	 	 
     "Statement": [
       {
         "Effect": "Allow",
         "Action": [
           "sso:GetManagedApplicationInstance",
           "sso:ListProfiles",
           "sso:AssociateProfile",
           "sso:DisassociateProfile",
           "sso:GetProfile"
         ],
         "Resource": "*"
       }
     ]
   }
   ```

------

1. 在**檢閱政策**畫面上，輸入政策的名稱。當您滿意時，選擇 **Create policy (建立政策)**。確認畫面頂端的紅色方塊未出現任何錯誤。如出現任何錯誤，請加以修正。

## （選用） 將您的 IAM 主體新增為金鑰使用者，以使用 AWS 來自 Key Management Service (KMS) 的客戶受管金鑰建立 Amazon DataZone 網域
<a name="create-custom-to-manage-kms"></a>

在您可以從 AWS Key Management Service (KMS) 選擇性地使用客戶受管金鑰 (CMK) 建立 Amazon DataZone 網域之前，請完成下列程序，讓您的 IAM 主體成為 KMS 金鑰的使用者。

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

1. 若要檢視您所建立及管理帳戶中的金鑰，請在導覽窗格中選擇**Customer managed keys** (客戶受管金鑰)。

1. 在 KMS 金鑰清單中，選擇您要檢查之 KMS 金鑰的別名或金鑰 ID。

1. 若要新增或移除金鑰使用者，以及允許或不允許外部 AWS 帳戶使用 KMS 金鑰，請使用頁面**金鑰使用者**區段中的控制項。金鑰使用者可以在密碼編譯操作中使用 KMS 金鑰，例如加密、解密、重新加密和產生資料金鑰。