

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

# Amazon Verified Permissions 的身分和存取管理
<a name="security-iam"></a>

AWS Identity and Access Management (IAM) 是 AWS 服務 ，可協助管理員安全地控制對 AWS resources 的存取。 IAM 管理員可控制誰可以經過*身分驗證 *（登入） 和*授權* （具有許可） 來使用 Verified Permissions 資源。 IAM 是您可以免費使用 AWS 服務 的 。

**Topics**
+ [

## 目標對象
](#security_iam_audience)
+ [

## 使用身分驗證
](#security_iam_authentication)
+ [

## 使用政策管理存取權
](#security_iam_access-manage)
+ [

# Amazon Verified Permissions 如何使用 IAM
](security_iam_service-with-iam.md)
+ [

# IAM Verified Permissions 的 政策
](security-iam-getting-started-policies.md)
+ [

# Amazon Verified Permissions 的身分型政策範例
](security_iam_id-based-policy-examples.md)
+ [

# AWS Amazon Verified Permissions 的 受管政策
](security-iam-awsmanpol.md)
+ [

# 對 Amazon Verified Permissions 身分和存取進行故障診斷
](security_iam_troubleshoot.md)

## 目標對象
<a name="security_iam_audience"></a>

您的使用方式 AWS Identity and Access Management (IAM) 會根據您的角色而有所不同：
+ **服務使用者** — 若無法存取某些功能，請向管理員申請所需許可 (請參閱 [對 Amazon Verified Permissions 身分和存取進行故障診斷](security_iam_troubleshoot.md))
+ **服務管理員** — 負責設定使用者存取權並提交相關許可請求 (請參閱 [Amazon Verified Permissions 如何使用 IAM](security_iam_service-with-iam.md))
+ **IAM 管理員** - 撰寫政策以管理存取 （請參閱 [Amazon Verified Permissions 的身分型政策範例](security_iam_id-based-policy-examples.md))

## 使用身分驗證
<a name="security_iam_authentication"></a>

身分驗證是您 AWS 使用身分憑證登入 的方式。您必須以 AWS 帳戶根使用者、IAM 使用者或擔任 IAM 角色身分進行身分驗證。

您可以使用身分來源的登入資料，例如 AWS IAM Identity Center (IAM Identity Center)、單一登入身分驗證或 Google/Facebook 登入資料，以聯合身分的形式登入。如需有關登入的詳細資訊，請參閱《AWS 登入 使用者指南》**中的[如何登入您的 AWS 帳戶](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html)。

對於程式設計存取， AWS 提供 SDK 和 CLI 以密碼編譯方式簽署請求。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的 [AWS API 請求的簽章版本 4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html)。

### AWS 帳戶 根使用者
<a name="security_iam_authentication-rootuser"></a>

 當您建立 時 AWS 帳戶，您會從一個名為 AWS 帳戶 *theroot 使用者的*登入身分開始，該身分具有對所有 AWS 服務 和 資源的完整存取權。強烈建議不要使用根使用者來執行日常任務。如需需要根使用者憑證的任務，請參閱*IAM 《 使用者指南》*中的[需要根使用者憑證](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks)的任務。

### 聯合身分
<a name="security_iam_authentication-federated"></a>

最佳實務是要求人類使用者使用聯合身分提供者，以 AWS 服務 使用臨時憑證存取 。

*聯合身分*是您企業目錄、Web 身分提供者的使用者，或使用來自身分來源的 AWS 服務 憑證存取 Directory Service 。聯合身分會擔任角色，而該角色會提供臨時憑證。

若需集中化管理存取權限，建議使用 AWS IAM Identity Center。如需詳細資訊，請參閱 *AWS IAM Identity Center 使用者指南*中的[什麼是 IAM Identity Center？](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)。

### IAM 使用者和群組
<a name="security_iam_authentication-iamuser"></a>

*IAM 使用者*[https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)是一種身分具備單人或應用程式的特定許可權。建議以臨時憑證取代具備長期憑證的 IAM 使用者。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[要求人類使用者使用聯合身分提供者，以 AWS 使用臨時憑證存取 ](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp)。

[https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)會指定 IAM 使用者的集合，讓大量使用者更容易管理許可。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[IAM 使用者使用案例](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html)。

### IAM 角色
<a name="security_iam_authentication-iamrole"></a>

*[IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)*是 中具有特定許可 AWS 帳戶 的身分。它類似 IAM 使用者，但不與特定的人員相關聯。您可以 AWS 管理主控台 切換 IAM 角色，暫時在 中擔任 [角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html)。您可以透過呼叫 AWS CLI 或 AWS API 操作或使用自訂 URL 來擔任角色。如需使用角色方法的詳細資訊，請參閱*IAM 《 使用者指南*》中的[使用 IAM 角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)。

IAM 具有臨時登入資料的 角色在下列情況下非常有用：
+ **聯合身分使用者存取** – 如需向聯合身分指派許可，請建立角色，並為角色定義許可。當聯合身分進行身分驗證時，該身分會與角色建立關聯，並獲授予由角色定義的許可。如需聯合角色的相關資訊，請參閱*IAM 《 使用者指南*》中的[為第三方身分提供者 （聯合） 建立角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html)。如果您使用 IAM Identity Center，則需要設定許可集。為控制身分驗證後可以存取的內容，IAM Identity Center 將許可集與 IAM中的角色相關聯。如需有關許可集的資訊，請參閱《*AWS IAM Identity Center 使用者指南*》中的[許可集](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html)。
+ **臨時 IAM 使用者許可** – IAM 使用者或角色可以擔任 IAM 角色，暫時接受特定任務的不同許可。
+ **跨帳戶存取權** − 您可以使用 IAM 角色，允許不同帳戶中的某人 (受信任的主體) 存取您帳戶的資源。角色是授予跨帳戶存取權的主要方式。不過，對於某些 AWS 服務，您可以直接將政策連接到資源 （而不是使用角色做為代理）。若要了解跨帳戶存取的角色和資源型政策之間的差異，請參閱*IAM 《 使用者指南*》中的[IAM 角色與資源型政策的差異](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_compare-resource-policies.html)。
+ **在 上執行的應用程式 Amazon EC2** – 您可以使用 IAM 角色來管理在 EC2 執行個體上執行之應用程式的臨時登入資料，以及提出 AWS CLI 或 AWS API 請求。這是在 EC2 執行個體內儲存存取金鑰的較好方式。若要將 AWS 角色指派給 EC2 執行個體並將其提供給其所有應用程式，您可以建立連接至執行個體的執行個體描述檔。執行個體設定檔包含該角色，並且可讓 EC2 執行個體上執行的程式取得臨時憑證。如需詳細資訊，請參閱*IAM 《 使用者指南*[Amazon EC2 》中的使用 IAM 角色將許可授予執行個體上執行的應用程式](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)。

若要了解如何使用 IAM 角色或 IAM 使用者，請參閱*IAM 《 使用者指南*》中的[建立 IAM 角色 （而非使用者） 的時機](https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html#id_which-to-choose_role)。

## 使用政策管理存取權
<a name="security_iam_access-manage"></a>

您可以透過建立政策並將其連接到身分或資源 AWS 來控制 AWS 中的存取。政策定義與身分或資源相關聯的許可。當委託人提出請求時 AWS ， 會評估這些政策。大多數政策會以 JSON 文件 AWS 形式存放在 中。如需 JSON 政策文件的詳細資訊，請參閱*IAM 《 使用者指南*》中的 [JSON 政策概觀](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json)。

管理員會使用政策，透過定義哪些**主體**可在哪些**條件**下對哪些**資源**執行**動作**，以指定可存取的範圍。

預設情況下，使用者和角色沒有許可。 IAM 管理員會建立 IAM 政策並將其新增至角色，使用者可以擔任該角色。無論用來執行操作的方法為何， IAM 政策都會定義許可。

### 身分型政策
<a name="security_iam_access-manage-id-based-policies"></a>

身分型政策是附加至身分 (使用者、使用者群組或角色) 的 JSON 許可政策文件。這類政策控制身分可對哪些資源執行哪些動作，以及適用的條件。若要了解如何建立身分型政策，請參閱*IAM 《 使用者指南*》中的[使用客戶受管政策定義自訂 IAM 許可](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

身分型政策可分為*內嵌政策* (直接內嵌於單一身分) 與*受管政策* (可附加至多個身分的獨立政策)。若要了解如何在受管和內嵌政策之間進行選擇，請參閱*IAM 《 使用者指南*》中的在[受管政策和內嵌政策之間進行選擇](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html)。

### 資源型政策
<a name="security_iam_access-manage-resource-based-policies"></a>

資源型政策是附加到資源的 JSON 政策文件。範例包括 IAM *角色信任政策和* Amazon S3 *儲存貯體政策*。在支援資源型政策的服務中，服務管理員可以使用它們來控制對特定資源的存取權限。您必須在資源型政策中[指定主體](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html)。

資源型政策是位於該服務中的內嵌政策。您無法在資源型政策 IAM 中使用來自 的 AWS 受管政策。

### 存取控制清單 (ACL)
<a name="security_iam_access-manage-acl"></a>

存取控制清單 (ACL) 可控制哪些主體 (帳戶成員、使用者或角色) 擁有存取某資源的許可。ACL 類似於資源型政策，但它們不使用 JSON 政策文件格式。

Amazon S3 AWS WAF、 和 Amazon VPC 是支援 ACLs的服務範例。如需進一步了解 ACL，請參閱《Amazon Simple Storage Service 開發人員指南》**中的[存取控制清單 (ACL) 概觀](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html)。

### 其他政策類型
<a name="security_iam_access-manage-other-policies"></a>

AWS 支援其他政策類型，可設定更多常見政策類型授予的最大許可：
+ **許可界限** – 設定身分型政策可授予 IAM 實體的最大許可。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[IAM 實體的許可界限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html)。
+ **服務控制政策 (SCP)** — 為 AWS Organizations中的組織或組織單位指定最大許可。如需詳細資訊，請參閱《AWS Organizations 使用者指南》**中的[服務控制政策](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html)。
+ **資源控制政策 (RCP)** — 設定您帳戶中資源可用許可的上限。如需詳細資訊，請參閱《AWS Organizations 使用者指南》**中的[資源控制政策 (RCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html)。
+ **工作階段政策** — 在以程式設計方式為角色或聯合身分使用者建立臨時工作階段時，以參數形式傳遞的進階政策。如需詳細資訊，請參閱 *IAM 使用者指南*中的[工作階段政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)。

### 多種政策類型
<a name="security_iam_access-manage-multiple-policies"></a>

當多種類型的政策套用到請求時，產生的許可會更複雜而無法理解。若要了解如何 AWS 決定是否在涉及多個政策類型時允許請求，請參閱*IAM 《 使用者指南*》中的[政策評估邏輯](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html)。

# Amazon Verified Permissions 如何使用 IAM
<a name="security_iam_service-with-iam"></a>

在您使用 IAM 管理 Verified Permissions 的存取權之前，請先了解哪些 IAM 功能可與 Verified Permissions 搭配使用。






**IAM 您可以搭配 Amazon Verified Permissions 使用的功能**  

| IAM 功能 | 已驗證許可支援 | 
| --- | --- | 
|  [身分型政策](#security-iam-service-with-iam-id-based-policies)  |  是  | 
|  [資源型政策](#security-iam-service-with-iam-resource-based-policies)  |  否  | 
|  [政策動作](#security-iam-service-with-iam-id-based-policies-actions)  |  是  | 
|  [政策資源](#security-iam-service-with-iam-id-based-policies-resources)  |  是  | 
|  [政策條件索引鍵](#security-iam-service-with-iam-id-based-policies-conditionkeys)  |  否  | 
|  [ACL](#security-iam-service-with-iam-acls)  |  否  | 
|  [ABAC (政策中的標籤)](#security-iam-service-with-iam-tags)  |  是  | 
|  [臨時憑證](#security-iam-service-with-iam-roles-tempcreds)  |  是  | 
|  [主體許可](#security-iam-service-with-iam-principal-permissions)  |  是  | 
|  [服務角色](#security-iam-service-with-iam-roles-service)  |  否  | 
|  [服務連結角色](#security-iam-service-with-iam-roles-service-linked)  |  否  | 

若要全面了解 Verified Permissions 和其他 AWS 服務如何與大多數 IAM 功能搭配使用，請參閱*IAM 《 使用者指南*》中的 [AWS 服務 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)。

## Verified Permissions 的身分型政策
<a name="security-iam-service-with-iam-id-based-policies"></a>


|  |  | 
| --- |--- |
|  支援身分型政策  |  是  | 

身分型政策是可以連接到身分 (例如 IAM 使用者、使用者群組或角色) 的 JSON 許可政策文件。這些政策可控制身分在何種條件下能對哪些資源執行哪些動作。若要了解如何建立身分型政策，請參閱*IAM 《 使用者指南*》中的[使用客戶受管政策定義自訂 IAM 許可](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

使用 IAM 身分型政策，您可以指定允許或拒絕的動作和資源，以及允許或拒絕動作的條件。若要了解您可以在 JSON 政策中使用的所有元素，請參閱*IAM 《 使用者指南*》中的 [IAM JSON 政策元素參考](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html)。

### Verified Permissions 的身分型政策範例
<a name="security-iam-service-with-iam-id-based-policies-examples"></a>



若要檢視 Verified Permissions 身分型政策的範例，請參閱 [Amazon Verified Permissions 的身分型政策範例](security_iam_id-based-policy-examples.md)。

## Verified Permissions 中的資源型政策
<a name="security-iam-service-with-iam-resource-based-policies"></a>


|  |  | 
| --- |--- |
|  支援以資源基礎的政策  |  否  | 

資源型政策是附加到資源的 JSON 政策文件。以資源為基礎的政策範例是 IAM *角色信任政策和* Amazon S3 *儲存貯體政策*。在支援資源型政策的服務中，服務管理員可以使用它們來控制對特定資源的存取權限。對於附加政策的資源，政策會定義指定的主體可以對該資源執行的動作以及在何種條件下執行的動作。您必須在資源型政策中[指定主體](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html)。委託人可以包含帳戶、使用者、角色、聯合身分使用者或 AWS 服務。

若要啟用跨帳戶存取，您可以將另一個帳戶中的整個帳戶或 IAM 實體指定為資源型政策中的委託人。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的 [中的跨帳戶資源存取 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。

## Verified Permissions 的政策動作
<a name="security-iam-service-with-iam-id-based-policies-actions"></a>


|  |  | 
| --- |--- |
|  支援政策動作  |  是  | 

管理員可以使用 AWS JSON 政策來指定誰可以存取內容。也就是說，哪個**主體**在什麼**條件**下可以對什麼**資源**執行哪些**動作**。

JSON 政策的 `Action` 元素描述您可以用來允許或拒絕政策中存取的動作。政策會使用動作來授予執行相關聯動作的許可。

若要查看 Verified Permissions 動作的清單，請參閱*《服務授權參考*》中的 [Amazon Verified Permissions 定義的動作](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonverifiedpermissions.html#amazonverifiedpermissions-actions-as-permissions)。

Verified Permissions 中的政策動作在動作之前使用以下字首：

```
verifiedpermissions
```

如需在單一陳述式中指定多個動作，請用逗號分隔。

```
"Action": [
      "verifiedpermissions:action1",
      "verifiedpermissions:action2"
         ]
```

您也可以使用萬用字元 (\$1) 來指定多個動作。例如，若要指定開頭是 `Get` 文字的所有動作，請包含以下動作：

```
"Action": "verifiedpermissions:Get*"
```

若要檢視 Verified Permissions 身分型政策的範例，請參閱 [Amazon Verified Permissions 的身分型政策範例](security_iam_id-based-policy-examples.md)。

## Verified Permissions 的政策資源
<a name="security-iam-service-with-iam-id-based-policies-resources"></a>


|  |  | 
| --- |--- |
|  支援政策資源  |  是  | 

管理員可以使用 AWS JSON 政策來指定誰可以存取內容。也就是說，哪個**主體**在什麼**條件**下可以對什麼**資源**執行哪些**動作**。

`Resource` JSON 政策元素可指定要套用動作的物件。最佳實務是使用其 [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html) 來指定資源。若動作不支援資源層級許可，使用萬用字元 (\$1) 表示該陳述式適用於所有資源。

```
"Resource": "*"
```

若要查看 Verified Permissions 資源類型及其 ARNs的清單，請參閱*《服務授權參考*》中的 [Amazon Verified Permissions 定義的資源類型](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonverifiedpermissions.html#amazonverifiedpermissions-resources-for-iam-policies)。若要了解您可以使用哪些動作指定每個資源的 ARN，請參閱 [Amazon Verified Permissions 定義的動作](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonverifiedpermissions.html#amazonverifiedpermissions-actions-as-permissions)。

## Verified Permissions 的政策條件索引鍵
<a name="security-iam-service-with-iam-id-based-policies-conditionkeys"></a>


|  |  | 
| --- |--- |
|  支援服務特定政策條件金鑰  |  否  | 

管理員可以使用 AWS JSON 政策來指定誰可以存取內容。也就是說，哪個**主體**在什麼**條件**下可以對什麼**資源**執行哪些**動作**。

`Condition` 元素會根據定義的條件，指定陳述式的執行時機。您可以建立使用[條件運算子](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html)的條件運算式 (例如等於或小於)，來比對政策中的條件和請求中的值。若要查看所有 AWS 全域條件索引鍵，請參閱*IAM 《 使用者指南*》中的[AWS 全域條件內容索引鍵](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html)。

## 已驗證許可中的 ACLs
<a name="security-iam-service-with-iam-acls"></a>


|  |  | 
| --- |--- |
|  支援 ACL  |  否  | 

存取控制清單 (ACL) 可控制哪些主體 (帳戶成員、使用者或角色) 擁有存取某資源的許可。ACL 類似於資源型政策，但它們不使用 JSON 政策文件格式。

## 具有已驗證許可的 ABAC
<a name="security-iam-service-with-iam-tags"></a>


|  |  | 
| --- |--- |
|  支援 ABAC (政策中的標籤)  |  是  | 

屬性型存取控制 (ABAC) 是一種授權策略，依據稱為標籤的屬性來定義許可。您可以將標籤連接至 IAM 實體 AWS 和資源，然後設計 ABAC 政策，以便在委託人的標籤符合資源上的標籤時允許操作。

如需根據標籤控制存取，請使用 `aws:ResourceTag/key-name`、`aws:RequestTag/key-name` 或 `aws:TagKeys` 條件索引鍵，在政策的[條件元素](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html)中，提供標籤資訊。

如果服務支援每個資源類型的全部三個條件金鑰，則對該服務而言，值為 **Yes**。如果服務僅支援某些資源類型的全部三個條件金鑰，則值為 **Partial**。

如需 ABAC 的詳細資訊，請參閱*IAM 《 使用者指南*》中的[使用 ABAC 授權定義許可](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html)。若要檢視包含設定 ABAC 步驟的教學課程，請參閱*IAM 《 使用者指南*》中的[使用屬性型存取控制 (ABAC)](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)。

## 搭配 Verified Permissions 使用臨時憑證
<a name="security-iam-service-with-iam-roles-tempcreds"></a>


|  |  | 
| --- |--- |
|  支援臨時憑證  |  是  | 

臨時登入資料提供對 AWS 資源的短期存取，並在您使用聯合或切換角色時自動建立。 AWS 建議您動態產生臨時登入資料，而不是使用長期存取金鑰。如需詳細資訊，請參閱*IAM 《 使用者指南*[》中的在 IAM 和 中使用 的臨時安全登入](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)資料。 [AWS 服務IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)

## 已驗證許可的跨服務主體許可
<a name="security-iam-service-with-iam-principal-permissions"></a>


|  |  | 
| --- |--- |
|  支援主體許可  |  是  | 

 轉送存取工作階段 (FAS) 使用呼叫 的委託人許可 AWS 服務，並結合 請求 AWS 服務 向下游服務提出請求。如需提出 FAS 請求時的政策詳細資訊，請參閱[轉發存取工作階段](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_forward_access_sessions.html)。

## Verified Permissions 的服務角色
<a name="security-iam-service-with-iam-roles-service"></a>


|  |  | 
| --- |--- |
|  支援服務角色  |  否  | 

 服務角色是服務擔任以代表您執行動作[IAM 的角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)。 IAM 管理員可以從內部建立、修改和刪除服務角色 IAM。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[建立角色以將許可委派給 AWS 服務](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html)。

## Verified Permissions 的服務連結角色
<a name="security-iam-service-with-iam-roles-service-linked"></a>


|  |  | 
| --- |--- |
|  支援服務連結角色。  |  否  | 

 服務連結角色是連結至 的一種服務角色 AWS 服務。服務可以擔任代表您執行動作的角色。服務連結角色會出現在您的 中 AWS 帳戶 ，並由服務擁有。 IAM 管理員可以檢視，但不能編輯服務連結角色的許可。

如需建立或管理服務連結角色的詳細資訊，請參閱 [AWS 使用的服務 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html)。在資料表中尋找服務，其中包含**服務連結角色**欄中的 `Yes`。選擇**是**連結，以檢視該服務的服務連結角色文件。

# IAM Verified Permissions 的 政策
<a name="security-iam-getting-started-policies"></a>

Verified Permissions 會管理應用程式中使用者的許可。為了讓您的應用程式呼叫 Verified Permissions APIs 或 AWS 管理主控台 允許使用者在 Verified Permissions 政策存放區中管理 Cedar 政策，您必須新增必要的 IAM 許可。

身分型政策是您可以連接到身分的 JSON 許可政策文件，例如 IAM 使用者、使用者群組或角色。這些政策可控制身分在何種條件下能對哪些資源執行哪些動作。若要了解如何建立以身分為基礎的政策，請參閱 IAM 《 使用者指南》中的[建立 IAM 政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html)。

使用 IAM 身分型政策，您可以指定允許或拒絕的動作和資源，以及允許或拒絕動作的條件 （如下所示）。您無法在身分型政策中指定主體，因為這會套用至連接的使用者或角色。若要了解您可以在 JSON 政策中使用的所有元素，請參閱 IAM 《 使用者指南》中的 [IAM JSON 政策元素參考](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html)。


|  **Action**  |  **Description**  | 
| --- | --- | 
| [CreateIdentitySource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreateIdentitySource.html) | 建立新身分來源的動作。 | 
| [CreatePolicy](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreatePolicy.html) |  在政策存放區中建立 Cedar 政策的動作。您可以建立靜態政策或連結至政策範本的政策。  | 
| [CreatePolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreatePolicyStore.html) | 建立新政策存放區的動作。 | 
| [CreatePolicyTemplate](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_CreatePolicyTemplate.html) | 建立新政策範本的動作。 | 
| [DeleteIdentitySource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_DeleteIdentitySource.html) | 刪除身分來源的動作。 | 
| [DeletePolicy](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_DeletePolicy.html) | 從政策存放區刪除政策的動作。 | 
| [DeletePolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_DeletePolicyStore.html) | 刪除政策存放區的動作。 | 
| [DeletePolicyTemplate](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_DeletePolicyTemplate.html) | 刪除政策範本的動作。 | 
| [GetIdentitySource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetIdentitySource.html) | 取得身分來源的動作。 | 
| [GetPolicy](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetPolicy.html) | 擷取指定政策相關資訊的動作。 | 
| [GetPolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetPolicyStore.html) | 擷取指定政策存放區相關資訊的動作。 | 
| [GetPolicyTemplate](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetPolicyTemplate.html) | 取得政策範本的動作。 | 
| [GetSchema](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_GetSchema.html) | 取得結構描述的動作。 | 
| [IsAuthorized](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html) | 根據[授權請求中所述的參數取得授權回應](terminology.md#term-authorization-response)的動作。 [授權請求](terminology.md#term-authorization-request) | 
| [IsAuthorizedWithToken](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorizedWithToken.html) | 根據委託人來自身分字符的授權[請求中所述的參數，取得授權](terminology.md#term-authorization-request)[回應](terminology.md#term-authorization-response)的動作。 | 
| [ListIdentitySources](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListIdentitySources.html) | 在 中列出所有身分來源的動作 AWS 帳戶。 | 
| [ListPolicies](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListPolicies.html) | 列出政策存放區中所有政策的動作。 | 
| [ListPolicyStores](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListPolicyStores.html) | 列出 中所有政策存放區的動作 AWS 帳戶。 | 
| [ListPolicyTemplates](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListPolicyTemplates.html) | 在 中列出所有政策範本的動作 AWS 帳戶。 | 
| [ListTagsForResource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListTagsForResource.html) | 列出資源所有標籤的動作。 | 
| [PutSchema](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_PutSchema.html) | 將結構描述新增至政策存放區的動作。 | 
| [TagResource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_TagResource.html) | 將標籤新增至資源的動作。 | 
| [UpdateIdentitySource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdateIdentitySource.html) | 更新身分來源的動作。 | 
| [UpdatePolicy](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicy.html) | 在政策存放區中更新政策的動作。 | 
| [UpdatePolicyStore](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyStore.html) | 更新政策存放區的動作。 | 
| [UpdatePolicyTemplate](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UpdatePolicyTemplate.html) | 更新政策範本的動作。 | 
| [UntagResource](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_UntagResource.html) | 從資源移除標籤的動作。 | 

CreatePolicy 動作的許可範例 IAM 政策：

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

****  

```
{
"Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "verifiedpermissions:CreatePolicy"
            ],
            "Resource": "*"
        }
    ]
 }
```

------

# Amazon Verified Permissions 的身分型政策範例
<a name="security_iam_id-based-policy-examples"></a>

根據預設，使用者和角色沒有建立或修改 Verified Permissions 資源的許可。他們也無法使用 AWS 管理主控台、 AWS Command Line Interface (AWS CLI) 或 AWS API 來執行任務。 IAM 管理員必須建立 IAM 政策，授予使用者和角色對其所需資源執行動作的許可。管理員接著必須將這些政策連接至需要這些許可的使用者。

若要了解如何使用這些範例 JSON 政策文件來建立身分 IAM 型政策，請參閱*IAM 《 使用者指南*》中的[建立 IAM 政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)。

如需有關 Verified Permissions 定義的動作和資源類型的詳細資訊，包括每種資源類型的 ARNs 格式，請參閱《*服務授權參考*》中的 [Amazon Verified Permissions 的動作、資源和條件索引鍵](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonverifiedpermissions.html)。

**Topics**
+ [

## 政策最佳實務
](#security-iam-service-with-iam-policy-best-practices)
+ [

## 使用 Verified Permissions 主控台
](#security-iam-id-based-policy-examples-console)
+ [

## 允許使用者檢視他們自己的許可
](#security-iam-id-based-policy-examples-view-own-permissions)

## 政策最佳實務
<a name="security-iam-service-with-iam-policy-best-practices"></a>

身分型政策會判斷您帳戶中的某個人員是否可以建立、存取或刪除 Verified Permissions 資源。這些動作可能會讓您的 AWS 帳戶產生費用。當您建立或編輯身分型政策時，請遵循下列準則及建議事項：
+ **開始使用 AWS 受管政策並邁向最低權限許可** – 若要開始將許可授予您的使用者和工作負載，請使用將許可授予許多常見使用案例的 *AWS 受管政策*。它們可在您的 中使用 AWS 帳戶。我們建議您定義特定於使用案例 AWS 的客戶受管政策，以進一步減少許可。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的 [AWS 受管政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)或[AWS 任務函數的 受管政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html)。
+ **套用最低權限許可** – 當您使用 IAM 政策設定許可時，請僅授予執行任務所需的許可。為實現此目的，您可以定義在特定條件下可以對特定資源採取的動作，這也稱為*最低權限許可*。如需使用 IAM 套用許可的詳細資訊，請參閱*IAM 《 使用者指南*》中的 中的[政策和許可 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)。
+ **使用 IAM 政策中的條件來進一步限制存取** – 您可以在政策中新增條件，以限制對動作和資源的存取。例如，您可以撰寫政策條件，指定必須使用 SSL 傳送所有請求。如果透過特定 例如 使用服務動作 AWS 服務，您也可以使用條件來授予其存取權 CloudFormation。如需詳細資訊，請參閱《IAM 使用者指南》**中的 [IAM JSON 政策元素：條件](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html)。
+ **使用 IAM Access Analyzer 驗證您的 IAM 政策，以確保安全且功能正常的許可** – IAM Access Analyzer 會驗證新的和現有的政策，使政策符合 IAM 政策語言 (JSON) 和 IAM 最佳實務。IAM Access Analyzer 提供 100 多項政策檢查及切實可行的建議，可協助您撰寫安全且實用的政策。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[使用 IAM Access Analyzer 驗證政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html)。
+ **需要多重要素驗證 (MFA)** – 如果您的案例需要 IAM 使用者或 中的根使用者 AWS 帳戶，請開啟 MFA 以提高安全性。如需在呼叫 API 操作時請求 MFA，請將 MFA 條件新增至您的政策。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[使用 MFA 保護 API 存取](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html)。

如需 中最佳實務的詳細資訊 IAM，請參閱*IAM 《 使用者指南》*中的 中的[安全最佳實務 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)。

## 使用 Verified Permissions 主控台
<a name="security-iam-id-based-policy-examples-console"></a>

若要存取 Amazon Verified Permissions 主控台，您必須擁有一組最低許可。這些許可必須允許您列出和檢視 中已驗證許可資源的詳細資訊 AWS 帳戶。如果您建立比最基本必要許可更嚴格的身分型政策，則對於具有該政策的實體 (使用者或角色) 而言，主控台就無法如預期運作。

對於僅呼叫 AWS CLI 或 AWS API 的使用者，您不需要允許最低主控台許可。反之，只需允許存取符合他們嘗試執行之 API 操作的動作就可以了。

為了確保使用者和角色仍然可以使用 Verified Permissions 主控台，也請將 Verified Permissions `ConsoleAccess`或`ReadOnly` AWS 受管政策連接到實體。如需詳細資訊，請參閱*IAM 《 使用者指南*》中的[新增許可給使用者](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html#users_change_permissions-add-console)。

## 允許使用者檢視他們自己的許可
<a name="security-iam-id-based-policy-examples-view-own-permissions"></a>

此範例會示範如何建立政策，允許 IAM 使用者檢視附加到他們使用者身分的內嵌及受管政策。此政策包含在主控台或使用 或 AWS CLI AWS API 以程式設計方式完成此動作的許可。

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ViewOwnUserInfo",
            "Effect": "Allow",
            "Action": [
                "iam:GetUserPolicy",
                "iam:ListGroupsForUser",
                "iam:ListAttachedUserPolicies",
                "iam:ListUserPolicies",
                "iam:GetUser"
            ],
            "Resource": ["arn:aws:iam::*:user/${aws:username}"]
        },
        {
            "Sid": "NavigateInConsole",
            "Effect": "Allow",
            "Action": [
                "iam:GetGroupPolicy",
                "iam:GetPolicyVersion",
                "iam:GetPolicy",
                "iam:ListAttachedGroupPolicies",
                "iam:ListGroupPolicies",
                "iam:ListPolicyVersions",
                "iam:ListPolicies",
                "iam:ListUsers"
            ],
            "Resource": "*"
        }
    ]
}
```

# AWS Amazon Verified Permissions 的 受管政策
<a name="security-iam-awsmanpol"></a>







若要新增許可給使用者、群組和角色，使用 AWS 受管政策比自行撰寫政策更容易。[建立 IAM 客戶受管政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)需要時間和專業知識，為您的團隊提供他們所需的許可。若要快速開始使用，您可以使用我們的 AWS 受管政策。這些政策涵蓋常見的使用案例，並可在您的 AWS 帳戶中使用。如需 AWS 受管政策的詳細資訊，請參閱*IAM 《 使用者指南*》中的 [AWS 受管政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)。

AWS 服務會維護和更新 AWS 受管政策。您無法變更 AWS 受管政策中的許可。服務偶爾會在 AWS 受管政策中新增其他許可以支援新功能。此類型的更新會影響已連接政策的所有身分識別 (使用者、群組和角色)。當新功能啟動或新操作可用時，服務很可能會更新 AWS 受管政策。服務不會從 AWS 受管政策移除許可，因此政策更新不會破壞您現有的許可。

此外， AWS 支援跨多個 服務之任務函數的受管政策。例如，**ReadOnlyAccess** AWS 受管政策提供所有 AWS 服務和資源的唯讀存取權。當服務啟動新功能時， 會為新操作和資源 AWS 新增唯讀許可。如需任務函數政策的清單和說明，請參閱*IAM 《 使用者指南*》中的[AWS 任務函數的受管政策](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html)。









## AWS 受管政策：AmazonVerifiedPermissionsFullAccess
<a name="security-iam-awsmanpol-AmazonVerifiedPermissionsFullAccess"></a>

`AmazonVerifiedPermissionsFullAccess` 受管政策會授予 Verified Permissions 的完整存取權。若要使用 Amazon Cognito型身分來源，您需要連接個別的政策，例如 [AmazonCognitoReadOnly](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonCognitoReadOnly.html) 政策。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AccountLevelPermissions",
      "Effect": "Allow",
      "Action": [
        "verifiedpermissions:CreatePolicyStore",
        "verifiedpermissions:ListPolicyStores"
      ],
      "Resource": "*"
    },
    {
      "Sid": "PolicyStoreLevelPermissions",
      "Effect": "Allow",
      "Action": [
        "verifiedpermissions:*"
      ],
      "Resource": [
        "arn:aws:verifiedpermissions::*:policy-store/*"
      ]
    }
  ]
}
```

------

## AWS 受管政策：AmazonVerifiedPermissionsReadOnlyAccess
<a name="security-iam-awsmanpol-AmazonVerifiedPermissionsReadOnlyAccess"></a>

`AmazonVerifiedPermissionsReadOnlyAccess` 受管政策授予 Verified Permissions 的唯讀存取權。

此政策會授予 Amazon Verified Permissions 所有讀取操作的存取權，包括授權查詢 APIs `IsAuthorized`和 `IsAuthorizedWithToken`。

**注意**  
分別將存取權`BatchIsAuthorizedWithToken`授予 `BatchIsAuthorized`和 時`IsAuthorizedWithToken`，會自動授予對 `IsAuthorized`和 的存取權。

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

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AccountLevelPermissions",
      "Effect": "Allow",
      "Action": [
        "verifiedpermissions:ListPolicyStores"
      ],
      "Resource": "*"
    },
    {
      "Sid": "PolicyStoreLevelPermissions",
      "Effect": "Allow",
      "Action": [
        "verifiedpermissions:GetIdentitySource",
        "verifiedpermissions:GetPolicy",
        "verifiedpermissions:GetPolicyStore",
        "verifiedpermissions:GetPolicyTemplate",
        "verifiedpermissions:GetSchema",
        "verifiedpermissions:IsAuthorized",
        "verifiedpermissions:IsAuthorizedWithToken",
        "verifiedpermissions:ListIdentitySources",
        "verifiedpermissions:ListPolicies",
        "verifiedpermissions:ListPolicyTemplates"
      ],
      "Resource": [
        "arn:aws:verifiedpermissions::*:policy-store/*"
      ]
    }
  ]
}
```

------





## AWS 受管政策的已驗證許可更新
<a name="security-iam-awsmanpol-updates"></a>



檢視自此服務開始追蹤這些變更以來，Verified Permissions AWS 受管政策更新的詳細資訊。如需此頁面變更的自動提醒，請訂閱 Verified Permissions 文件歷史記錄頁面上的 RSS 摘要。




| 變更 | 描述 | Date | 
| --- | --- | --- | 
|  [AmazonVerifiedPermissionsFullAccess](#security-iam-awsmanpol-AmazonVerifiedPermissionsFullAccess) – 新政策  |  Verified Permissions 新增了新的政策，以允許完整存取 Verified Permissions。  | 2024 年 10 月 11 日 | 
|  [AmazonVerifiedPermissionsReadOnlyAccess](#security-iam-awsmanpol-AmazonVerifiedPermissionsReadOnlyAccess) – 新政策  |  Verified Permissions 新增了新的政策，以允許存取 Amazon Verified Permissions 的所有讀取操作，包括授權查詢 APIs`IsAuthorized`和 `IsAuthorizedWithToken`。  | 2024 年 10 月 11 日 | 
|  Verified Permissions 已開始追蹤變更  |  Verified Permissions 已開始追蹤其 AWS 受管政策的變更。  | 2024 年 10 月 11 日 | 

# 對 Amazon Verified Permissions 身分和存取進行故障診斷
<a name="security_iam_troubleshoot"></a>

使用以下資訊來協助您診斷和修正使用 Verified Permissions 和 時可能遇到的常見問題 IAM。

**Topics**
+ [

## 我無權在 Verified Permissions 中執行動作
](#security-iam-troubleshoot-no-permissions)
+ [

## 我未獲得執行 iam:PassRole 的授權
](#security-iam-troubleshoot-passrole)
+ [

## 我想要允許 以外的人員 AWS 帳戶 存取我的 Verified Permissions 資源
](#security-iam-troubleshoot-cross-account-access)

## 我無權在 Verified Permissions 中執行動作
<a name="security-iam-troubleshoot-no-permissions"></a>

如果您收到錯誤，告知您未獲授權執行動作，您的政策必須更新，允許您執行動作。

下列範例錯誤會在`mateojackson` IAM 使用者嘗試使用主控台檢視一個虛構 `my-example-widget` 資源的詳細資訊，但卻無虛構 `verifiedpermissions:GetWidget` 許可時發生。

```
User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: verifiedpermissions:GetWidget on resource: my-example-widget
```

在此情況下，必須更新 `mateojackson` 使用者的政策，允許使用 `verifiedpermissions:GetWidget` 動作存取 `my-example-widget` 資源。

如果您需要協助，請聯絡您的 AWS 管理員。您的管理員提供您的簽署憑證。

## 我未獲得執行 iam:PassRole 的授權
<a name="security-iam-troubleshoot-passrole"></a>

如果您收到錯誤，告知您無權執行 `iam:PassRole`動作，您的政策必須更新，以允許您將角色傳遞給 Verified Permissions。

有些 AWS 服務 可讓您將現有角色傳遞給該服務，而不是建立新的服務角色或服務連結角色。如需執行此作業，您必須擁有將角色傳遞至該服務的許可。

當名為 的 IAM `marymajor` 使用者嘗試使用主控台在 Verified Permissions 中執行動作時，會發生下列範例錯誤。但是，動作請求服務具備服務角色授予的許可。Mary 沒有將角色傳遞給服務的許可。

```
User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole
```

在這種情況下，Mary 的政策必須更新，允許她執行 `iam:PassRole` 動作。

如果您需要協助，請聯絡您的 AWS 管理員。您的管理員提供您的簽署憑證。

## 我想要允許 以外的人員 AWS 帳戶 存取我的 Verified Permissions 資源
<a name="security-iam-troubleshoot-cross-account-access"></a>

您可以建立一個角色，讓其他帳戶中的使用者或您組織外部的人員存取您的資源。您可以指定要允許哪些信任物件取得該角色。針對支援基於資源的政策或存取控制清單 (ACL) 的服務，您可以使用那些政策來授予人員存取您的資源的許可。

如需進一步了解，請參閱以下內容：
+ 若要了解 Verified Permissions 是否支援這些功能，請參閱 [Amazon Verified Permissions 如何使用 IAM](security_iam_service-with-iam.md)。
+ 若要了解如何提供您擁有 AWS 帳戶 的資源存取權，請參閱《 *IAM 使用者指南*》[中的在您擁有 AWS 帳戶 的另一個 中為 IAM 使用者提供存取權](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html)。
+ 若要了解如何將資源的存取權提供給第三方 AWS 帳戶，請參閱*IAM 《 使用者指南*》中的[將存取權提供給第三方 AWS 帳戶 擁有](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html)。
+ 若要了解如何透過聯合身分提供存取權，請參閱*IAM 《 使用者指南*》中的[提供存取權給外部驗證的使用者 （聯合身分）](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html)。
+ 若要了解使用角色和資源型政策進行跨帳戶存取之間的差異，請參閱*IAM 《 使用者指南*》中的 [中的跨帳戶資源存取 IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。