

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

# 在 AWS Transit Gateway 中替换静态路由
<a name="tgw-replace-static-route"></a>

将中转网关路由表中的静态路由替换为其他静态路由。

**使用控制台替换静态路由**

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

1. 在导航窗格中，选择 **Transit Gateway Route Tables（中转网关路由表）**。

1. 在路由表中选择要替换的路由。

1. 在详细信息部分中，选择**路径**选项卡。

1. 选择**操作**、**替换静态路由**。

1. 对于**类型**，选择**活动**或**黑洞**。

1. 从**选择附件**下拉列表中，选择将取代路由表中当前连接的中转网关。

1. 选择**替换静态路由**。

**使用 AWS CLI 替换静态路由**  
使用 [replace-transit-gateway-route](https://docs.aws.amazon.com/cli/latest/reference/ec2/replace-transit-gateway-route.html) 命令。