选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

为 S3 Storage Lens 存储统计管理工具启用可信访问权限

聚焦模式
为 S3 Storage Lens 存储统计管理工具启用可信访问权限 - Amazon Simple Storage Service

通过启用可信访问权限,可让 Amazon S3 Storage Lens 存储统计管理工具通过 AWS Organizations API 操作访问 AWS Organizations 层次结构、成员资格和结构。然后,S3 Storage Lens 存储统计管理工具便成为整个组织结构的可信服务。

无论何时创建控制面板配置,S3 Storage Lens 存储统计管理工具都会在组织的管理或委托管理员账户中创建服务相关角色。服务相关角色向 S3 Storage Lens 存储统计管理工具授予执行以下操作的权限:

  • 描述组织

  • 列出账户

  • 验证组织的 AWS 服务访问权限列表

  • 为组织获取委托管理员

随后,S3 Storage Lens 存储统计管理工具可以确保它具有相应的访问权限,可收集组织中账户的跨账户指标。有关更多信息,请参阅使用面向 Amazon S3 Storage Lens 存储统计管理工具的服务相关角色

启用可信访问权限后,您可以为组织中的账户分配委托管理员访问权限。当账户被标记为服务的委托管理员时,该账户将获得访问所有只读组织 API 操作的授权。此访问权限向委托管理员提供了对您组织成员和结构的可见性,以便他们也可以创建 S3 Storage Lens 存储统计管理工具控制面板。

注意
  • 只能由管理账户启用可信访问权限。

  • 只有管理账户和委托管理员才能为您的组织创建 S3 Storage Lens 存储统计管理工具控制面板或配置。

使 S3 Storage Lens 存储统计管理工具拥有 AWS Organizations 可信访问权限
  1. 登录到AWS Management Console,然后通过以下网址打开 Amazon S3 控制台:https://console.aws.amazon.com/s3/

  2. 在左侧导航窗格中,导航到 Storage Lens 存储统计管理工具

  3. 选择 AWS Organizations 设置。将显示 Storage Lens 存储统计管理工具的 AWS Organizations 访问权限页面。

  4. AWS Organizations 可信访问权限下,选择编辑

    将显示 AWS Organizations 访问权限页面。

  5. 选择启用,以便为 S3 Storage Lens 存储统计管理工具控制面板启用可信访问权限。

  6. 选择 Save changes(保存更改)

使 S3 Storage Lens 存储统计管理工具拥有 AWS Organizations 可信访问权限
  1. 登录到AWS Management Console,然后通过以下网址打开 Amazon S3 控制台:https://console.aws.amazon.com/s3/

  2. 在左侧导航窗格中,导航到 Storage Lens 存储统计管理工具

  3. 选择 AWS Organizations 设置。将显示 Storage Lens 存储统计管理工具的 AWS Organizations 访问权限页面。

  4. AWS Organizations 可信访问权限下,选择编辑

    将显示 AWS Organizations 访问权限页面。

  5. 选择启用,以便为 S3 Storage Lens 存储统计管理工具控制面板启用可信访问权限。

  6. 选择 Save changes(保存更改)

以下示例显示了如何在 AWS CLI 中为 S3 Storage Lens 存储统计管理工具启用 AWS Organizations 可信访问权限。

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

以下示例显示了如何在 AWS CLI 中为 S3 Storage Lens 存储统计管理工具启用 AWS Organizations 可信访问权限。

aws organizations enable-aws-service-access --service-principal storage-lens.s3.amazonaws.com
例 – 使用适用于 Java 的 SDK 为 S3 Storage Lens 存储统计管理工具启用 AWS Organizations 可信访问权限

以下示例显示了如何在适用于 Java 的 SDK 中为 S3 Storage Lens 存储统计管理工具启用可信访问权限。要使用此示例,请将 user input placeholders 替换为您自己的信息。

import com.amazonaws.AmazonServiceException; import com.amazonaws.SdkClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.organizations.AWSOrganizations; import com.amazonaws.services.organizations.AWSOrganizationsClient; import com.amazonaws.services.organizations.model.EnableAWSServiceAccessRequest; public class EnableOrganizationsTrustedAccess { private static final String S3_STORAGE_LENS_SERVICE_PRINCIPAL = "storage-lens.s3.amazonaws.com"; public static void main(String[] args) { try { AWSOrganizations organizationsClient = AWSOrganizationsClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(Regions.US_EAST_1) .build(); organizationsClient.enableAWSServiceAccess(new EnableAWSServiceAccessRequest() .withServicePrincipal(S3_STORAGE_LENS_SERVICE_PRINCIPAL)); } catch (AmazonServiceException e) { // The call was transmitted successfully, but AWS Organizations couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // AWS Organizations couldn't be contacted for a response, or the client // couldn't parse the response from AWS Organizations. e.printStackTrace(); } } }

例 – 使用适用于 Java 的 SDK 为 S3 Storage Lens 存储统计管理工具启用 AWS Organizations 可信访问权限

以下示例显示了如何在适用于 Java 的 SDK 中为 S3 Storage Lens 存储统计管理工具启用可信访问权限。要使用此示例,请将 user input placeholders 替换为您自己的信息。

import com.amazonaws.AmazonServiceException; import com.amazonaws.SdkClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.organizations.AWSOrganizations; import com.amazonaws.services.organizations.AWSOrganizationsClient; import com.amazonaws.services.organizations.model.EnableAWSServiceAccessRequest; public class EnableOrganizationsTrustedAccess { private static final String S3_STORAGE_LENS_SERVICE_PRINCIPAL = "storage-lens.s3.amazonaws.com"; public static void main(String[] args) { try { AWSOrganizations organizationsClient = AWSOrganizationsClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(Regions.US_EAST_1) .build(); organizationsClient.enableAWSServiceAccess(new EnableAWSServiceAccessRequest() .withServicePrincipal(S3_STORAGE_LENS_SERVICE_PRINCIPAL)); } catch (AmazonServiceException e) { // The call was transmitted successfully, but AWS Organizations couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // AWS Organizations couldn't be contacted for a response, or the client // couldn't parse the response from AWS Organizations. e.printStackTrace(); } } }
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。