

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

# 將路由表匯出至 Amazon S3 in AWS Transit Gateway
<a name="tgw-export-route-tables"></a>

您可以將傳輸閘道路由表中的路由匯出至 Amazon S3 儲存貯體。路由儲存至 JSON 檔案中指定的 Amazon S3 儲存貯體。

**使用主控台匯出傳輸閘道路由表**

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

1. 在導覽窗格中，選擇 **Transit Gateway Route Tables** (傳輸閘道路由表)。

1. 選擇內含要匯出之路由的路由表。

1. 選擇 **Actions (動作)**、**Export routes (匯出路由)**。

1. 在 **Export routes (匯出路由)** 頁面上，請在 **S3 bucket name (S3 儲存貯體名稱)** 輸入 S3 儲存貯體的名稱。

1. 欲篩選所匯出的路由，請在頁面的 **Filters (篩選條件)** 部分指定篩選條件參數。

1. 選擇 **Export routes (匯出路由)**。

若要存取匯出的路由，請在 [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/)，開啟 Amazon S3 主控台，然後導覽至您指定的儲存貯體。檔案名稱包含 AWS 帳戶 ID、 AWS 區域、路由表 ID 和時間戳記。選取檔案，然後選擇 **Download (下載)**。以下是 JSON 檔案的範例，其中包含 VPC 連接的兩個傳播路由的相關資訊。

```
{
  "filter": [
    {
      "name": "route-search.subnet-of-match",
      "values": [
        "0.0.0.0/0",
        "::/0"
      ]
    }
  ],
  "routes": [
    {
      "destinationCidrBlock": "10.0.0.0/16",
      "transitGatewayAttachments": [
        {
          "resourceId": "vpc-0123456abcd123456",
          "transitGatewayAttachmentId": "tgw-attach-1122334455aabbcc1",
          "resourceType": "vpc"
        }
      ],
      "type": "propagated",
      "state": "active"
    },
    {
      "destinationCidrBlock": "10.2.0.0/16",
      "transitGatewayAttachments": [
        {
          "resourceId": "vpc-abcabc123123abca",
          "transitGatewayAttachmentId": "tgw-attach-6677889900aabbcc7",
          "resourceType": "vpc"
        }
      ],
      "type": "propagated",
      "state": "active"
    }
  ]
}
```