

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 Amazon Transit Gateway 中创建对等连接
<a name="tgw-peering-create"></a>

在开始之前，请确保您获得了所要连接的中转网关的 ID。如果中转网关位于另一个 Amazon Web Services 账户 中，则请确保您具有中转网关拥有者的 Amazon Web Services 账户 ID。创建对等挂载后，接受方中转网关的拥有者必须接受或拒绝挂载请求。

**使用控制台创建对等连接挂载**

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

1. 在导航窗格中，选择 **Transit Gateway Attachments（中转网关连接）**。

1. 选择 **Create Transit Gateway Attachment**（创建中转网关连接）。

1. 对于 **Transit Gateway ID**（中转网关 ID），选择要用于连接的中转网关。您可以选择自己拥有的中转网关。与您共享的中转风关不能用于对等节点。

1. 对于 **Attachment type (挂载类型)**，选择 **Peering Connection (对等连接)**。

1. （可选）输入挂载的名称标签。

1. 对于 **Account (账户)**，执行以下操作之一：
   + 如果中转网关在您的账户中，请选择 **My account (我的账户)**。
   + 如果中转网关位于其他 Amazon Web Services 账户 中，则请选择“其他账户”****。对于 **Account ID (账户 ID)**，输入 Amazon Web Services 账户 ID。

1. 对于 **Region (区域)**，选择中转网关所在的区域。

1. 对于 **Transit gateway ID (accepter)** (中转网关 ID（接受方）)，输入您希望连接的中转网关的 ID。

1. 选择 **Create Transit Gateway Attachment** (创建中转网关挂载)。

**使用 Amazon CLI 创建对等连接**  
使用 [create-transit-gateway-peering-attachment](https://docs.amazonaws.cn/cli/latest/reference/ec2/create-transit-gateway-peering-attachment.html) 命令。