

# 创建 S3 on Outposts 访问点
<a name="S3OutpostsCreateAccessPoint"></a>

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

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

以下示例显示如何使用 AWS 管理控制台、AWS Command Line Interface (AWS CLI) 和 适用于 Java 的 AWS SDK 创建 S3 on Outposts 访问点。

**注意**  
创建 Outposts 存储桶的 AWS 账户 拥有该存储桶，也是唯一可以为其分配访问点的账户。

## 使用 S3 控制台
<a name="s3-outposts-bucket-create-accesspoint"></a>

1. 通过以下网址打开 Amazon S3 控制台：[https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/)。

1. 在左侧导航窗格中，选择 **Outposts buckets**（Outposts 存储桶）。

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

1. 选择 **Outposts 访问点**选项卡。

1. 在 **Outposts access points**（Outposts 访问点）部分中，选择 **Create Outposts access point**（创建 Outposts 访问点）。

1. 在 **Outposts access point settings**（Outposts 访问点设置）中，输入访问点的名称，然后选择访问点的 Virtual Private Cloud (VPC)。

1. 如果要为访问点添加策略，请在 **Outposts access point policy**（Outposts 访问点策略）部分中输入策略。

   有关更多信息，请参阅 [使用 S3 on Outposts 设置 IAM](S3OutpostsIAM.md)。

## 使用 AWS CLI
<a name="S3OutpostsCreateAccessPointCLI"></a>

**Example**  
以下 AWS 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 的 AWS 软件开发工具包
<a name="S3OutpostsCreateAccessPointJava"></a>

**Example**  
有关如何使用适用于 Java 的 AWS SDK 为 S3 Outposts 存储桶创建接入点的示例，请参阅《AWS SDK for Java 2.x Code Examples》**中的 [CreateOutpostsAccessPoint.java](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/s3/src/main/java/com/example/s3/outposts/CreateOutpostsAccessPoint.java)。