

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

# 在 AWS Transit Gateway 中建立對等連接
<a name="tgw-peering-create"></a>

開始之前，請確定您具有要連線之傳輸閘道的 ID。如果傳輸閘道位於另一個 中 AWS 帳戶，請確定您擁有傳輸閘道擁有者的 AWS 帳戶 ID。建立對等連接後，接受者傳輸閘道的擁有者必須接受或拒絕連接請求。

**使用主控台建立對等附件**

1. 在 [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/) 開啟 Amazon VPC 主控台。

1. 在導覽窗格中，選擇 **Transit Gateway Attachments** (傳輸閘道連接)。

1. 選擇 **Create transit gateway attachment** (建立傳輸閘道連接)。

1. 在 **Transit gateway ID** (傳輸閘道 ID) 中，選擇用於連接的傳輸閘道。您可以選擇自己擁有的傳輸閘道。與您共用的傳輸閘道無法用於對等互連。

1. 針對 **Attachment type (附件類型)**，選擇 **Peering Connection (對等連線)**。

1. 選擇性地輸入附件的名稱標籤。

1. 針對 **Account (帳戶)**，執行下列其中一個動作：
   + 如果傳輸閘道在您的帳戶中，請選擇**我的帳戶**。
   + 如果傳輸閘道位於不同的 AWS 帳戶，請選擇**其他帳戶**。針對 **Account ID** (帳戶 ID)，輸入 AWS 帳戶 ID。

1. 在 **Region** (區域) 中，選擇傳輸閘道所在的區域。

1. 在 **Transit gateway (accepter)** (傳輸閘道 (接受者)) 中，輸入您要連接之傳輸閘道的 ID。

1. 選擇 **Create transit gateway attachment** (建立傳輸閘道連接)。

**使用 建立對等連接 AWS CLI**  
使用 [create-transit-gateway-peering-attachment](https://docs.aws.amazon.com/cli/latest/reference/ec2/create-transit-gateway-peering-attachment.html) 命令。