

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

# Amazon S3 Storage Lens 和 AWS Organizations
<a name="services-that-can-integrate-s3lens"></a>

透過授予 Amazon S3 Storage Lens 對組織的受信任存取權，您可以允許它收集和彙總組織中所有 AWS 帳戶 的指標。S3 Storage Lens 會透過存取屬於您組織的帳戶清單，收集並分析所有這些帳戶的儲存體、用量和活動指標來執行此操作。

如需詳細資訊，請參閱 *《Amazon S3 torage Lens 使用者指南》*中的[使用 Amazon S3 Storage Lens 的服務連結角色](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-service-linked-roles.html)。

使用以下資訊來協助您整合 Amazon S3 Storage Lens AWS Organizations。



## 當您啟用整合時，即會建立服務連結角色。
<a name="integrate-enable-slr-s3lens"></a>

當您啟用受信任存取，且 Storage Lens 組態已套用至您的組織時，會自動在您組織的委派管理員帳戶建立以下[服務連結角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)。該角色允許 Amazon S3 Storage Lens 在您組織的組織帳戶中執行支援的操作。

只有在您停用 Amazon S3 Storage Lens 和 Organizations 之間的受信任存取，或從組織中移除該成員帳戶時，才能移除或修改此角色。
+ `AWSServiceRoleForS3StorageLens` 

## 服務連結角色所使用的服務委託人
<a name="integrate-enable-svcprin-s3lens"></a>

上一節中的服務連結角色，只能由依據角色定義的信任關係所授權的服務委託人來假設。Amazon S3 Storage Lens 使用的服務連結角色會將存取權授予下列服務委託人：
+ `storage-lens.s3.amazonaws.com`

## 啟用 Amazon S3 Storage Lens 的受信任存取
<a name="integrate-enable-ta-s3lens"></a>

如需啟用受信任存取所需許可的資訊，請參閱[啟用信任的存取所需的許可](orgs_integrate_services.md#orgs_trusted_access_perms)。

您可以使用 Amazon S3 Storage Lens 主控台或 AWS Organizations 主控台來啟用受信任存取。

**重要**  
強烈建議您盡可能使用 Amazon S3 Storage Lens 主控台或工具來啟用與 Organizations 整合。這可讓 Amazon S3 Storage Lens 執行其需要的任何組態，例如建立服務所需的資源。只有在您無法使用 Amazon S3 Storage Lens 提供的工具啟用整合時，才能繼續執行這些步驟。如需詳細資訊，請參閱[本說明](orgs_integrate_services.md#important-note-about-integration)。  
如果您使用 Amazon S3 Storage Lens 主控台或工具啟用受信任的存取，則不需要完成這些步驟。

**使用 Amazon S3 主控台來啟用受信任存取**  
請參閱《Amazon Simple [Storage Service 使用者指南》中的啟用 S3 Storage Lens 的受信任存取](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/storage_lens_with_organizations.html#storage_lens_with_organizations_enabling_trusted_access)。 **

您可以使用 AWS Organizations 主控台、執行 AWS CLI 命令，或呼叫其中一個 AWS SDKs。

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

**使用 Organizations 主控台來啟用受信任的服務存取**

1. 登入 [AWS Organizations 主控台](https://console.aws.amazon.com/organizations/v2)。您必須以 IAM 使用者登入、擔任 IAM 角色，或是以組織管理帳戶中的根使用者 ([不建議](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)) 身分登入。

1. 在導覽窗格中，選擇**服務**。

1. 在服務清單中選擇 **Amazon S3 Storage Lens**。

1. 選擇 **Enable trusted access (啟用信任存取)**。

1. 在**啟用 Amazon S3 Storage Lens 的受信任存取**對話方塊中，輸入 **Enable** 進行確認，然後選擇**啟用受信任存取**。

1. 如果您只是 的管理員 AWS Organizations，請告訴 Amazon S3 Storage Lens 的管理員，他們現在可以從服務主控台 啟用該服務來使用 AWS Organizations 。

------
#### [ AWS CLI, AWS API ]

**使用 Organizations CLI/SDK 來啟用受信任服務存取**  
使用下列 AWS CLI 命令或 API 操作來啟用受信任的服務存取：
+ AWS CLI: [enable-aws-service-access](https://docs.aws.amazon.com/cli/latest/reference/organizations/enable-aws-service-access.html)

  執行下列命令，以啟用 Amazon S3 Storage Lens 做為 Organizations 的受信任服務。

  ```
  $ aws organizations enable-aws-service-access \ 
      --service-principal storage-lens.s3.amazonaws.com
  ```

  此命令成功後就不會產生輸出。
+ AWS API：[EnableAWSServiceAccess](https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html)

------

## 停用 Amazon S3 Storage Lens 的受信任存取
<a name="integrate-disable-ta-s3lens"></a>

如需啟用受信任的存取所需許可的資訊，請參閱[停用信任的存取所需的許可](orgs_integrate_services.md#orgs_trusted_access_disable_perms)。

您只能使用 Amazon S3 Storage Lens 工具停用受信任存取。

您可以使用 Amazon S3 主控台、 AWS CLI 或任何 AWS SDKs。

**使用 Amazon S3 主控台來停用受信任存取**  
請參閱《*Amazon Simple* [Storage Service 使用者指南》中的停用 S3 Storage Lens 的受信任存取](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/storage_lens_with_organizations.html#storage_lens_with_organizations_disabling_trusted_access)。

## 啟用 Amazon S3 Storage Lens 的委派管理員帳戶
<a name="integrate-enable-da-s3lens"></a>

當您將成員帳戶指定為組織的委派管理員時，該帳戶的使用者和角色可以對 Amazon S3 Storage Lens 執行管理動作，否則只能由組織管理帳戶中的使用者或角色執行。這可協助您將組織的管理與 Amazon S3 Storage Lens 的管理分開。

**最低許可**  
只有具有下列許可的 Organizations 管理帳戶中的使用者或角色，才能將成員帳戶設定為組織中 Amazon S3 Storage Lens 的委託管理員：  
`organizations:RegisterDelegatedAdministrator`  
`organizations:DeregisterDelegatedAdministrator`

Amazon S3 Storage Lens 最多可支援您組織中的 5 個委派管理員帳戶。

**將成員帳戶指定為 Amazon S3 Storage Lens 的委派管理員**  
您可以使用 Amazon S3 主控台、 AWS CLI 或任何 AWS SDKs 註冊委派管理員。若要使用 Amazon S3 主控台將成員帳戶註冊為組織的委派管理員帳戶，請參閱《*Amazon Simple Storage Service 使用者指南*》中的[註冊 S3 Storage Lens 的委派管理員](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/storage_lens_with_organizations.html#storage_lens_with_organizations_registering_delegated_admins)。

**取消註冊 Amazon S3 Storage Lens 的委派管理員。**  
您可以使用 Amazon S3 主控台、 AWS CLI 或任何 AWS SDKs 取消註冊委派管理員。若要使用 Amazon S3 主控台取消註冊委派管理員，請參閱《*Amazon Simple* [Storage Service 使用者指南》中的取消註冊 S3 Storage Lens 的委派管理員](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/storage_lens_with_organizations.html#storage_lens_with_organizations_deregistering_delegated_admins)。