创建 S3 on Outposts 访问点 - Amazon Simple Storage Service
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

创建 S3 on Outposts 访问点

要访问 Amazon S3 on Outposts 存储桶,您必须创建和配置访问点。

访问点可简化对 Amazon S3 中的共享数据集的大规模数据访问管理。访问点是附加到存储桶的命名网络端点,您可以使用这些存储桶执行 Amazon S3 对象操作(如 GetObjectPutObject)。对于 S3 on Outposts,您必须使用访问点访问 Outposts 存储桶中的任何对象。访问点仅支持虚拟主机式寻址。

以下示例显示如何使用 Amazon Web Services Management Console、Amazon Command Line Interface (Amazon CLI) 和 Amazon SDK for Java 创建 S3 on Outposts 访问点。

注意

创建 Outposts 存储桶的 Amazon Web Services 账户 拥有该存储桶,也是唯一可以为其分配访问点的账户。

  1. 通过以下网址打开 Amazon S3 控制台:https://console.aws.amazon.com/s3/

  2. 在左侧导航窗格中,选择 Outposts buckets(Outposts 存储桶)。

  3. 选择要为其创建 Outposts 访问点的 Outposts 存储桶。

  4. 选择 Outposts 访问点选项卡。

  5. Outposts access points(Outposts 访问点)部分中,选择 Create Outposts access point(创建 Outposts 访问点)。

  6. Outposts access point settings(Outposts 访问点设置)中,输入访问点的名称,然后选择访问点的 Virtual Private Cloud (VPC)。

  7. 如果要为访问点添加策略,请在 Outposts access point policy(Outposts 访问点策略)部分中输入策略。

    有关更多信息,请参阅使用 S3 on Outposts 设置 IAM

以下 Amazon CLI 示例为 Outposts 存储桶创建访问点。要运行此命令,请将 user input placeholders 替换为您自己的信息。

aws s3control create-access-point --account-id 123456789012 --name example-outposts-access-point --bucket "arn:aws:s3-outposts:region:123456789012:outpost/op-01ac5d28a6a232904/bucket/example-outposts-bucket" --vpc-configuration VpcId=example-vpc-12345

以下适用于 Java 的软件开发工具包示例为 Outpost 存储桶创建访问点。要使用此示例,请将 user input placeholders 替换为您自己的信息。

import com.amazonaws.services.s3control.model.*; public String createAccessPoint(String bucketArn, String accessPointName) { CreateAccessPointRequest reqCreateAP = new CreateAccessPointRequest() .withAccountId(AccountId) .withBucket(bucketArn) .withName(accessPointName) .withVpcConfiguration(new VpcConfiguration().withVpcId("vpc-12345")); CreateAccessPointResult respCreateAP = s3ControlClient.createAccessPoint(reqCreateAP); System.out.printf("CreateAccessPoint Response: %s%n", respCreateAP.toString()); return respCreateAP.getAccessPointArn(); }