

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

# 直接查詢 OpenSearch Service 中的 Amazon Security Lake 資料
<a name="direct-query-security-lake-overview"></a>

本節將逐步引導您在 Amazon OpenSearch Service 中建立和設定資料來源整合的程序，讓您有效率地查詢和分析存放在 Security Lake 中的資料。

在下列頁面中，您將了解如何設定 Security Lake 直接查詢資料來源、導覽必要的先決條件，以及使用 step-by-step程序 AWS 管理主控台。

**Topics**
+ [在 OpenSearch Service 中建立 Amazon Security Lake 資料來源整合](direct-query-security-lake-creating.md)
+ [在 OpenSearch Dashboards 中設定和查詢 Security Lake 資料來源](direct-query-security-lake-configure.md)
+ [定價](#direct-query-security-lake-pricing)
+ [限制](#direct-query-security-lake-limitations)
+ [建議](#direct-query-security-lake-recommendations)
+ [配額](#direct-query-security-lake-quotas)
+ [支援的 AWS 區域](#direct-query-security-lake-regions)

## 定價
<a name="direct-query-security-lake-pricing"></a>

Amazon OpenSearch Service 為 Security Lake 直接查詢提供 OpenSearch Compute Unit (OCU) 定價。當您執行直接查詢時，會產生每小時 OCUs的費用，在您的帳單上列為 DirectQuery OCU 用量類型。您也會產生與 Amazon Security Lake 不同的費用。

直接查詢有兩種類型：互動式和索引化檢視查詢。
+ *互動式查詢*用於填入資料選擇器，並在 Security Lake 中對您的資料進行分析。OpenSearch Service 使用單獨的預熱任務處理每個查詢，而無需維護延伸工作階段。
+ *索引檢視查詢*使用運算來維護 OpenSearch Service 中的索引檢視。這些查詢通常需要更長的時間，因為它們會將不同數量的資料擷取至具名索引。對於 Security Lake 連線的資料來源，索引資料會儲存在 OpenSearch Serverless 集合中，其中會向您收取資料索引 (IndexingOCU)、資料搜尋 (SearchOCU) 和以 GB 儲存的資料的費用。

如需詳細資訊，請參閱 [Amazon OpenSearch Service 定價](https://aws.amazon.com/opensearch-service/pricing/)中的直接查詢和無伺服器區段。

## 限制
<a name="direct-query-security-lake-limitations"></a>

下列限制適用於 Security Lake 中的直接查詢：
+ 與 Security Lake 的直接查詢整合僅適用於 OpenSearch Service 集合和 OpenSearch 使用者介面。
+ OpenSearch Serverless 集合的網路承載限制為 100 MiB。
+ Security Lake 的資料表管理是在 Lake Formation 中執行。
+ Security Lake 僅支援具體化視觀表做為索引化視觀表。不支援覆蓋索引。
+ AWS CloudFormation 尚不支援 範本。
+ 相較於使用直接查詢，使用 OpenSearch 索引時OpenSearch SQL 和 OpenSearch PPL 陳述式有不同的限制。直接查詢支援 JOINs、子查詢和查詢等進階命令，而對 OpenSearch 索引上這些命令的支援有限或不存在。如需詳細資訊，請參閱[支援的 SQL 和 PPL 命令](direct-query-supported-commands.md)。

## 建議
<a name="direct-query-security-lake-recommendations"></a>

在 Security Lake 中使用直接查詢時，我們建議您執行下列動作：
+ 檢查您的 Security Lake 狀態，並確保其順利執行，沒有任何問題。如需詳細的故障診斷步驟，請參閱《Amazon Security Lake 使用者指南》中的[對資料湖狀態進行故障診斷](https://docs.aws.amazon.com/security-lake/latest/userguide/securitylake-data-lake-troubleshoot.html)。
+ 驗證您的查詢存取：
  + 如果您要從與 Security Lake 委派管理員帳戶不同的帳戶查詢 Security Lake，請在 [Security Lake 中設定具有查詢存取權的訂閱者](https://docs.aws.amazon.com/security-lake/latest/userguide/subscriber-query-access.html)。
  + 如果您要從相同帳戶查詢 Security Lake，請檢查 Security Lake 中有關向 LakeFormation 註冊受管 S3 儲存貯體的任何訊息。
+ 探索查詢範本和預先建置的儀表板，以快速開始分析。
+ 熟悉開放式網路安全結構描述架構 (OCSF) 和 Security Lake：
  + 檢閱 [OCSF GitHub 儲存庫](https://github.com/ocsf/examples/tree/main/mappings/markdown/AWS/v1.1.0/CloudTrail)中 AWS 來源的結構描述映射範例
  + 了解如何造訪[AWS 來源版本 2 (OCSF 1.1.0) 的 Security Lake 查詢，以有效地查詢 Security](https://docs.aws.amazon.com/security-lake/latest/userguide/subscriber-query-examples2.html) Lake
  + 使用分割區來改善查詢效能：`region`、 `accountid`和 `time_dt`
+ 熟悉 Security Lake 支援用於查詢的 SQL 語法。如需詳細資訊，請參閱[支援的 OpenSearch SQL 命令和函數](supported-directquery-sql.md)。
+ 對查詢使用限制，以確保您不會向後提取太多資料。

## 配額
<a name="direct-query-security-lake-quotas"></a>


| 說明 | Value | 軟性限制？ | 備註 | 
| --- | --- | --- | --- | 
| 跨直接查詢 APIs 的帳戶層級 TPS 限制 | 3 TPS | 是 |  | 
| 資料來源數量上限 | 20 | 是 | 限制為 AWS 帳戶。 | 
| 自動重新整理索引或具體化視觀表上限 | 30 | 是 | 限制適用於每個資料來源。<br />僅包含自動重新整理設定為 true MVs)。 | 
| 並行查詢上限 | 30 | 是 | 限制適用於處於待定或執行狀態的查詢。<br />包括互動式查詢 （例如 等資料擷取命令`SELECT`) 和索引查詢 （例如 `CREATE`/`ALTER`/ 等操作`DROP`)。 | 
| 每個查詢的並行 OCU 上限 | 512 | 是 | OpenSearch 運算單位 (OCU)。根據 15 個執行器和 1 個驅動程式的限制，每個都具有 16 個 vCPU 和 32 GB 記憶體。代表並行處理能力。 | 
| 查詢執行時間上限，以分鐘為單位 | 30 | 否 | 僅適用於互動式查詢 （例如 等資料擷取命令SELECT)。對於REFRESH查詢，限制為 6 小時。 | 
| 清除過時查詢 IDs 的期間 | 90 天 | 是 | 這是 OpenSearch Service 清除舊項目查詢中繼資料的期間。例如，對超過 90 天的查詢呼叫 GetDirectQuery 或 GetDirectQueryResult 失敗。 | 

## 支援的 AWS 區域
<a name="direct-query-security-lake-regions"></a>

Security Lake 中的直接查詢 AWS 區域 支援以下項目：
+ 亞太地區 (孟買)
+ 亞太地區 (新加坡)
+ 亞太地區 (雪梨)
+ 亞太區域 (東京)
+ 加拿大 (中部)
+ 歐洲 (法蘭克福)
+  歐洲 (愛爾蘭)
+ 歐洲 (斯德哥爾摩)
+ 美國東部 (維吉尼亞北部)
+ 美國東部 (俄亥俄)
+ 美國西部 (奧勒岡)
+ Europe (Paris) 
+ 歐洲 (倫敦)
+ 南美洲 (聖保羅)