在 Outpost 上建立端點 - Amazon S3 on Outposts

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

在 Outpost 上建立端點

若要將請求路由至 Amazon S3 on Outpost 存取點,您必須建立和設定 S3 on Outposts 端點。若要建立端點,您需要與 Outposts 主要區域的服務連結有效連接。Outpost 上的每個 Virtual Private Cloud (VPC) 可以有一個相關聯的端點。如需端點配額的詳細資訊,請參閱 S3 on Outposts 網路需求。您必須建立端點,才能存取您的 Outposts 儲存貯體並執行物件操作。如需詳細資訊,請參閱端點

許可

如需建立端點所需許可的詳細資訊,請參閱 適用於 S3 on Outposts 端點的許可

當您建立端點時,S3 on Outposts 也會在您的 AWS 帳戶中建立服務連結角色。如需詳細資訊,請參閱針對 Amazon S3 on Outposts 使用服務連結角色

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

  1. 登入 AWS Management Console ,並在 https://Amazon S3 主控台://https:/https://console.aws.amazon.com/s3/.microsoft.com。

  2. 在左側導覽窗格中,選擇 Outposts access points (Outposts 存取點)。

  3. 選擇 Outposts endpoints (Outposts 端點) 索引標籤。

  4. 選擇 Create Outposts endpoint (建立 Outposts 端點)。

  5. Outpost 下,選擇 Outpost 以建立此端點。

  6. VPC 下,選擇還沒有端點且符合 Ourposts 端點規則的 VPC。

    虛擬私有雲端 (VPC) 可讓您在定義的虛擬網路中啟動 AWS 資源。這個虛擬網路與您在資料中心中操作的傳統網路非常相似,且具備使用 可擴展基礎設施的優勢 AWS

    如果您沒有 VPC,請選擇 Create VPC (建立 VPC)。如需詳細資訊,請參閱《Amazon S3 使用者指南》中的建立僅限虛擬私有雲端 (VPC) 使用的存取點

  7. 選擇 Create Outposts endpoint (建立 Outposts 端點)。

下列 AWS CLI 範例會使用 VPC 資源存取類型,為 Outpost 建立端點。VPC 衍生自子網路。若要執行此命令,請以您自己的資訊取代 user input placeholders

aws s3outposts create-endpoint --outpost-id op-01ac5d28a6a232904 --subnet-id subnet-8c7a57c5 --security-group-id sg-ab19e0d1

下列 AWS CLI 範例使用客戶擁有的 IP 地址集區 (CoIP 集區) 存取類型,為 Outpost 建立端點。若要執行此命令,請以您自己的資訊取代 user input placeholders

aws s3outposts create-endpoint --outpost-id op-01ac5d28a6a232904 --subnet-id subnet-8c7a57c5 --security-group-id sg-ab19e0d1 --access-type CustomerOwnedIp --customer-owned-ipv4-pool ipv4pool-coip-12345678901234567

下列適用於 Java 的開發套件範例建立 Outposts 的端點。若要使用此範例,請以您自己的資訊取代 user input placeholders

import com.amazonaws.services.s3outposts.AmazonS3Outposts; import com.amazonaws.services.s3outposts.AmazonS3OutpostsClientBuilder; import com.amazonaws.services.s3outposts.model.CreateEndpointRequest; import com.amazonaws.services.s3outposts.model.CreateEndpointResult; public void createEndpoint() { AmazonS3Outposts s3OutpostsClient = AmazonS3OutpostsClientBuilder .standard().build(); CreateEndpointRequest createEndpointRequest = new CreateEndpointRequest() .withOutpostId("op-0d79779cef3c30a40") .withSubnetId("subnet-8c7a57c5") .withSecurityGroupId("sg-ab19e0d1") .withAccessType("CustomerOwnedIp") .withCustomerOwnedIpv4Pool("ipv4pool-coip-12345678901234567"); // Use .withAccessType and .withCustomerOwnedIpv4Pool only when the access type is // customer-owned IP address pool (CoIP pool) CreateEndpointResult createEndpointResult = s3OutpostsClient.createEndpoint(createEndpointRequest); System.out.println("Endpoint is created and its ARN is " + createEndpointResult.getEndpointArn()); }