

要获得与亚马逊 Timestream 类似的功能 LiveAnalytics，可以考虑适用于 InfluxDB 的亚马逊 Timestream。适用于 InfluxDB 的 Amazon Timestream 提供简化的数据摄取和个位数毫秒级的查询响应时间，以实现实时分析。点击[此处](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)了解更多信息。

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

# 为 Timestream 创建接口 VPC 终端节点 LiveAnalytics
<a name="VPCEndpoints.vpc-endpoint-create"></a>

您可以使用 Amazon [VPC 控制台或 AWS Command Line Interface (AWS CLI) 为 LiveAnalytics 服务的 Timestream 创建接口 VPC 终端节点](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html)。要为 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 写入或查询 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)在 Endpoints [对象中返回的单元终端节点](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`操作是使用该`us-west-2`区域的 Write AP AWS I 在 CLI 中执行的：

```
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 创建了接口 VPC 终端节点 LiveAnalytics，[请为其创建 Timestream 的 VPC 终端节点策略](VPCEndpoints.vpc-endpoint-policy.md)。 LiveAnalytics