

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

# 使用 啟用 StackSets 的受信任存取 AWS Organizations
<a name="stacksets-orgs-activate-trusted-access"></a>

本主題提供如何使用 啟用受信任存取的指示 AWS Organizations，這是 StackSets 跨帳戶部署及使用 AWS 區域 *服務受管*許可所必需。要使用*自我管理*許可，請改為參閱 [授與自我管理許可](stacksets-prereqs-self-managed.md)。

建立具有服務受管許可的 StackSet 之前，您必須先完成下列任務：
+ [啟用 中的所有功能](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) AWS Organizations。如果只啟用合併帳單功能，則無法建立具有服務受管許可的 StackSet。
+ 使用 啟用受信任存取 AWS Organizations。透過此動作，可讓 CloudFormation 在管理帳戶中建立服務連結角色。啟用受信任存取後，當您建立具有服務受管許可的 StackSet 時，CloudFormation 會在目標 (會員) 帳戶中建立必要的服務連結角色和名為 `stacksets-exec-*` 的服務角色。

  啟用受信任存取後，管理帳戶和委派管理員帳戶可以為其組織建立和管理服務受管的 StackSets。

要啟用受信任存取，您必須是管理帳戶中的管理員使用者。*管理員使用者*是對您的 AWS 帳戶具有完整許可的使用者。如需詳細資訊，請參閱《AWS Account Management 參考指南》**中的[建立管理員使用者](https://docs.aws.amazon.com/accounts/latest/reference/getting-started-step4.html)。如需保護管理帳戶安全的建議，請參閱《AWS Organizations 使用者指南**》中的[管理帳戶的最佳實務](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_best-practices_mgmt-acct.html)。

**啟用受信任存取**

1. 以管理帳戶的管理員 AWS 身分登入 ，並在 開啟 CloudFormation 主控台[https://console.aws.amazon.com/cloudformation](https://console.aws.amazon.com/cloudformation)。

1. 從導覽窗格選擇 **StackSets**。如果停用受信任存取，則會顯示橫幅來提示您啟用受信任存取。  
![啟用受信任存取橫幅。](http://docs.aws.amazon.com/zh_tw/AWSCloudFormation/latest/UserGuide/images/console-stacksets-enable-trusted-access-from-stacksets-list-new.png)

1. 選擇**啟用受信任存取**。

   出現下列橫幅時，表示已成功啟用受信任存取。  
![已成功啟用受信任存取橫幅。](http://docs.aws.amazon.com/zh_tw/AWSCloudFormation/latest/UserGuide/images/console-stackset-trusted-access-enabled-banner-new.png)
**注意**  
「啟動 Organizations 存取」與「啟用 Organizations 存取」相同，「停用 Organizations 存取」與「禁用 Organizations 存取」相同。這些條款已根據行銷指導方針更新。

**停用受信任存取**  
請參閱《*AWS Organizations 使用者指南*》中的 [CloudFormation StackSets 和 AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-cloudformation.html)。

您必須先取消註冊所有委派管理員 AWS Organizations，才能使用 停用受信任的存取。如需詳細資訊，請參閱[註冊委派管理員](stacksets-orgs-delegated-admin.md)。

**注意**  
如需有關使用 API 操作而非主控台來啟用或停用受信任存取的資訊，請參閱：  
[https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateOrganizationsAccess.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_ActivateOrganizationsAccess.html)
[https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeactivateOrganizationsAccess.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeactivateOrganizationsAccess.html)
[https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeOrganizationsAccess.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeOrganizationsAccess.html)

## 服務連結角色
<a name="stacksets-orgs-service-linked-roles"></a>

管理帳戶使用 **AWSServiceRoleForCloudFormationStackSetsOrgAdmin** 服務連結角色。只有在停用 AWS Organizations 的受信任存取時，才能修改或刪除此角色。

每個目標帳戶會使用 **AWSServiceRoleForCloudFormationStackSetsOrgMember** 服務連結角色。您只能在兩個條件下修改或刪除此角色：如果 AWS Organizations 已停用 的受信任存取，或者如果帳戶已從目標組織或組織單位 (OU) 中移除。

如需詳細資訊，請參閱 *AWS Organizations 使用者指南*中的 [CloudFormation StackSets 和 AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/services-that-can-integrate-cloudformation.html)。