

如需與 Amazon Timestream for LiveAnalytics 類似的功能，請考慮使用 Amazon Timestream for InfluxDB。它提供簡化的資料擷取和單一位數毫秒查詢回應時間，以進行即時分析。[在這裡](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)進一步了解。

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

# 為 Timestream for LiveAnalytics 建立介面 VPC 端點
<a name="VPCEndpoints.vpc-endpoint-create"></a>

您可以使用 Amazon [VPC 主控台或 ()，為 Timestream for LiveAnalytics 服務建立介面 VPC 端點](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html)AWS CLI。 LiveAnalytics AWS Command Line Interface 若要為 Timestream 建立 VPC 端點，請完成以下所述的 Timestream 特定步驟。

**注意**  
在完成以下步驟之前，請確定您了解 [Timestream VPC 端點的特定考量。](VPCEndpoints.vpc-endpoint-considerations.md)

## 使用 Timestream 儲存格建構 VPC 端點服務名稱
<a name="VPCEndpoints.vpc-endpoint-create.vpc-endpoint-name"></a>

 由於 Timestream 的獨特架構，必須為每個 SDK （寫入和查詢） 建立個別的 VPC 介面端點。此外，您必須指定 Timestream 儲存格端點 （您只能為要映射的 Timestream 儲存格建立端點）。若要使用介面 VPC 端點從 VPC 中直接連線至 Timestream，請完成以下步驟：

1. 首先，尋找可用的 Timestream 儲存格端點。若要尋找可用的儲存格端點，請使用 [`DescribeEndpoints`動作](https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_DescribeEndpoints.html) （可透過寫入和查詢 APIs取得） 列出 Timestream 帳戶中可用的儲存格端點。如需更多詳細資訊，請參閱[範例](#VPCEndpoints.vpc-endpoint-create.vpc-endpoint-name.example)。

1. 選取要使用的儲存格端點之後，請為 Timestream Write 或 Query API 建立 VPC 介面端點字串：
   + *對於寫入 API：*

     ```
     com.amazonaws.<region>.timestream.ingest-<cell>
     ```
   + *對於查詢 API：*

     ```
     com.amazonaws.<region>.timestream.query-<cell>
     ```

    其中 *<region>* 是[有效的 AWS 區域代碼](https://docs.aws.amazon.com/general/latest/gr/rande.html)，而 *<cell>* 是 [DescribeEndpoints 動作](https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_DescribeEndpoints.html)在[端點物件](https://docs.aws.amazon.com/timestream/latest/developerguide/API_query_DescribeEndpoints.html#API_query_DescribeEndpoints_ResponseSyntax)中傳回的其中一個儲存格端點地址 （例如 `cell1`或 `cell2`)。如需詳細資訊，請參閱[範例](#VPCEndpoints.vpc-endpoint-create.vpc-endpoint-name.example)。

1. 現在您已建置 VPC 端點服務名稱，[請建立介面端點](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html)。當系統要求您提供 VPC 端點服務名稱時，請使用您在步驟 2 中建構的 VPC 端點服務名稱。

### 範例：建構您的 VPC 端點服務名稱
<a name="VPCEndpoints.vpc-endpoint-create.vpc-endpoint-name.example"></a>

在下列範例中，`DescribeEndpoints`動作會在 AWS CLI 中使用`us-west-2`區域中的寫入 API 執行：

```
aws timestream-write describe-endpoints --region us-west-2
```

此命令將傳回下列輸出：

```
{
    "Endpoints": [
        {
            "Address": "ingest-cell1.timestream.us-west-2.amazonaws.com",
            "CachePeriodInMinutes": 1440
        }
    ]
}
```

在此情況下， *cell1* 是 *<cell>* ，*us-west-2* 是 *<region>*。因此，產生的 VPC 端點服務名稱會如下所示：

```
com.amazonaws.us-west-2.timestream.ingest-cell1
```

現在您已為 Timestream for LiveAnalytics 建立界面 VPC 端點，[請為 Timestream for LiveAnalytics 建立 VPC 端點政策](VPCEndpoints.vpc-endpoint-policy.md)。