

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

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

# 一般安全性
<a name="timestream-for-influx-getting-started-security"></a>

**Topics**
+ [許可](#timestream-for-influx-getting-started-security-permissions)
+ [網路存取](#timestream-for-influx-getting-started-security-network-access)
+ [相依性](#timestream-for-influx-getting-started-security-dependencies)
+ [S3 儲存貯體](#timestream-for-influx-getting-started-security-s3-buckets)

## 許可
<a name="timestream-for-influx-getting-started-security-permissions"></a>

應授予 InfluxDB 使用者最低權限許可。遷移期間只應使用授予特定使用者的字符，而不是運算子字符。

InfluxDB 的 Timestream 使用 IAM 許可來控制使用者許可。我們建議使用者有權存取他們所需的特定動作和資源。如需詳細資訊，請參閱[授予最低權限存取](https://docs.aws.amazon.com/wellarchitected/2022-03-31/framework/sec_permissions_least_privileges.html)。

## 網路存取
<a name="timestream-for-influx-getting-started-security-network-access"></a>

Influx 遷移指令碼可在本機運作，在相同系統上的兩個 InfluxDB 執行個體之間遷移資料，但假設遷移的主要使用案例將跨本機或公有網路遷移資料。有鑑於此，將考量安全性。根據預設，Influx 遷移指令碼會驗證已啟用 TLS 之執行個體的 TLS 憑證：我們建議使用者在其 InfluxDB 執行個體中啟用 TLS，且不要對指令碼使用 `--skip-verify`選項。

我們建議您使用允許清單來限制來自您預期來源的網路流量。您可以透過限制來自已知 IPs 的 InfluxDB 執行個體網路流量來執行此操作。

## 相依性
<a name="timestream-for-influx-getting-started-security-dependencies"></a>

應使用所有相依性的最新主要版本，包括 Influx CLI、InfluxDB、Python、請求模組，以及選用的相依性，例如 `mountpoint-s3`和 `rclone`。

## S3 儲存貯體
<a name="timestream-for-influx-getting-started-security-s3-buckets"></a>

如果 S3 儲存貯體用作遷移的臨時儲存體，我們建議您啟用 TLS、版本控制和停用公有存取。

**使用 S3 儲存貯體進行遷移**

1. 開啟 AWS 管理主控台，導覽至 **Amazon Simple Storage Service**，然後選擇**儲存貯體**。

1. 選擇您要使用的儲存貯體。

1. 選擇**許可**索引標籤。

1. 在 **Block public access (bucket settings) (封鎖公開存取 (儲存貯體設定))** (封鎖公開存取 (儲存貯體設定)) 下，選擇 **Edit** (編輯)。

1. 勾選**封鎖所有公開存取**。

1. 選擇**儲存變更**。

1. 在 **Bucket policy (儲存貯體政策)** 下方，選擇 **Edit (編輯)**。

1. 輸入以下內容，將 *<example-bucket>* 取代為您的儲存貯體名稱，以強制使用 TLS 1.2 版或更新版本進行連線：

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "EnforceTLSv12orHigher",
               "Principal": {
                   "AWS": "*"
               },
               "Action": [
                   "s3:*"
               ],
               "Effect": "Deny",
               "Resource": [
                   "arn:aws:s3:::<example bucket>/*",
                   "arn:aws:s3:::<example bucket>"
               ],
               "Condition": {
                   "NumericLessThan": {
                       "s3:TlsVersion": 1.2
                   }
               }
           }
       ]
   }
   ```

------

1. 選擇**儲存變更**。

1. 選擇**屬性**索引標籤。

1. 在 **Bucket Versioning** (儲存貯體版本控制) 底下，選擇 **Edit** (編輯)。

1. 勾選**啟用**。

1. 選擇**儲存變更**。

如需 Amazon S3 儲存貯體最佳實務的相關資訊，請參閱 [Amazon Simple Storage Service 的安全最佳實務](https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html)。