建立 S3 on Outposts 存取點 - Amazon Simple Storage Service

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

建立 S3 on Outposts 存取點

若要存取 Amazon S3 on Outposts 儲存貯體,您必須建立和設定存取點。

存取點針對 Amazon S3 中的共用資料集,簡化管理大規模的資料存取。存取點為連接到儲存貯體的指定網路端點,您可以使用這些端點來執行 Amazon S3 物件操作,例如 GetObjectPutObject。使用 S3 on Outposts,您必須使用存取點來存取 Outposts 儲存貯體中的任何物件。存取點僅支援虛擬主機樣式定址。

下列範例示範如何使用 AWS Management Console、AWS Command Line Interface (AWS CLI) 和 AWS SDK for Java 建立 S3 on Outposts 存取點。

注意

建立 Outposts 儲存貯體的 AWS 帳戶 擁有該儲存貯體,且是唯一可以為其指派存取點的帳戶。

  1. 開啟位於 https://console.aws.amazon.com/s3/ 的 Amazon S3 主控台。

  2. 在左側導覽窗格中,選擇 Outposts buckets (Outposts 儲存貯體)。

  3. 選擇您要為其建立 Outposts 存取點的 Outposts 儲存貯體。

  4. 選擇 Outposts access points (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

下列 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 的開發套件範例建立 Outposts 儲存貯體的存取點。若要使用此範例,請以您自己的資訊取代 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(); }