

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

# 針對 Security Lake 中的問題進行故障診斷
<a name="security-lake-troubleshoot"></a>

如果您在使用 Amazon Security Lake 時遇到問題，請使用下列疑難排解資源。

下列主題提供與資料湖狀態、Lake Formation、在 Amazon Athena 中查詢和 IAM 相關的錯誤 AWS Organizations 和問題的疑難排解建議。如果您發現此處未列出的問題，您可以使用此頁面上的 `Feedback` 按鈕進行報告。

如果您在使用 Security Lake 時遇到問題，請參閱下列主題。

**Topics**
+ [對資料湖狀態進行故障診斷](securitylake-data-lake-troubleshoot.md)
+ [故障診斷 Lake Formation 問題](securitylake-lf-troubleshoot.md)
+ [對 Amazon Athena 中的查詢進行故障診斷](querying-troubleshoot.md)
+ [針對 Organizations 問題進行故障診斷](securitylake-orgs-troubleshoot.md)
+ [對 Amazon Security Lake 身分和存取進行故障診斷](security_iam_troubleshoot.md)

# 對資料湖狀態進行故障診斷
<a name="securitylake-data-lake-troubleshoot"></a>

Security Lake 主控台的問題****頁面會顯示影響資料湖的問題摘要。例如，如果您尚未為組織建立 CloudTrail 追蹤，Security Lake 無法啟用 AWS CloudTrail 管理事件的日誌收集。**問題**頁面涵蓋過去 14 天內發生的問題。您可以查看每個問題的描述和建議的修復步驟。

若要以程式設計方式存取問題摘要，您可以使用 Security Lake API [https://docs.aws.amazon.com/security-lake/latest/APIReference/API_ListDataLakeExceptions.html](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_ListDataLakeExceptions.html)的操作。如果您使用的是 AWS CLI，請執行 [https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/list-data-lake-exceptions.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/securitylake/list-data-lake-exceptions.html)命令。對於 `regions` 參數，您可以指定一或多個區域代碼，例如`us-east-1`美國東部 （維吉尼亞北部） 區域，以查看影響這些區域的問題。如果您未包含 `regions` 參數，則會傳回影響所有區域的問題。如需區域代碼清單，請參閱《》中的 [Amazon Security Lake 端點](https://docs.aws.amazon.com/general/latest/gr/securitylake.html)*AWS 一般參考*。

例如，下列 AWS CLI 命令會列出影響 `us-east-1`和 `eu-west-3`區域的問題。此範例已針對 Linux、macOS 或 Unix 格式化，並使用反斜線 (\$1) 行接續字元來改善可讀性。

```
$ aws securitylake list-data-lake-exceptions \
--regions "us-east-1" "eu-west-3"
```

若要將問題或錯誤通知 Security Lake 使用者，請使用 Security Lake API [https://docs.aws.amazon.com/security-lake/latest/APIReference/API_CreateDataLakeExceptionSubscription.html](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_CreateDataLakeExceptionSubscription.html)的操作。使用者可透過電子郵件、交付至 Amazon Simple Queue Service (Amazon SQS) 佇列、交付至 AWS Lambda 函數或其他支援的通訊協定收到通知。

例如，下列 AWS CLI 命令會透過簡訊交付，將 Security Lake 例外狀況的通知傳送至指定的帳戶。此範例已針對 Linux、macOS 或 Unix 格式化，並使用反斜線 (\$1) 行接續字元來改善可讀性。

```
$ aws securitylake create-data-lake-exception-subscription \
--notification-endpoint "123456789012" \
--exception-time-to-live 30 \
--subscription-protocol "sms"
```

若要檢視例外狀況訂閱的詳細資訊，您可以使用 [https://docs.aws.amazon.com/security-lake/latest/APIReference/API_GetDataLakeExceptionSubscription.html](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_GetDataLakeExceptionSubscription.html)操作。若要更新例外狀況訂閱，您可以使用 [https://docs.aws.amazon.com/security-lake/latest/APIReference/API_UpdateDataLakeExceptionSubscription.html](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_UpdateDataLakeExceptionSubscription.html)操作。若要刪除例外狀況訂閱並停止通知，您可以使用 [https://docs.aws.amazon.com/security-lake/latest/APIReference/API_DeleteDataLakeExceptionSubscription.html](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_DeleteDataLakeExceptionSubscription.html)操作。

# 故障診斷 Lake Formation 問題
<a name="securitylake-lf-troubleshoot"></a>

使用以下資訊來協助您診斷和修正使用 Security Lake 和 AWS Lake Formation 資料庫或資料表時可能遇到的常見問題。如需 Lake Formation 疑難排解主題的詳細資訊，請參閱《 [開發人員指南》中的疑難排解](https://docs.aws.amazon.com/lake-formation/latest/dg/troubleshooting.html)一節。 *AWS Lake Formation *

## 找不到資料表
<a name="securitylake-lf-table-not-found"></a>

嘗試建立訂閱者時，您可能會收到此錯誤。

若要解決此錯誤，請確定您已在 區域中新增來源。如果您在 Security Lake 服務處於預覽版本時新增了來源，則必須在建立訂閱者之前再次新增它們。如需新增來源的詳細資訊，請參閱 [Security Lake 中的來源管理](source-management.md)。

## 400 AccessDenied
<a name="securitylake-lf-access-denied"></a>

當您[新增自訂來源](adding-custom-sources.md)並呼叫 `CreateCustomLogSource` API 時，您可能會收到此錯誤。

若要解決錯誤，請檢閱 Lake Formation 許可。呼叫 API 的 IAM 角色應具有 Security Lake 資料庫的**建立資料表**許可。如需詳細資訊，請參閱《 *AWS Lake Formation 開發人員指南*》中的[使用 Lake Formation 主控台和具名資源方法來授予資料庫許可](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-database-permissions.html)。

## SYNTAX\$1ERROR：第 1：8 行：不允許來自沒有資料欄之關係的 SELECT \$1
<a name="securitylake-lf-syntax-error-select"></a>

在 Lake Formation 中第一次查詢來源資料表時，您可能會收到此錯誤。

若要解決錯誤，請將`SELECT`許可授予您在登入 時使用的 IAM 角色 AWS 帳戶。如需如何授予`SELECT`許可的指示，請參閱《 *AWS Lake Formation 開發人員指南*》中的[使用 Lake Formation 主控台授予資料表許可和具名資源方法](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-table-permissions.html)。

## Security Lake 無法將發起人的主要 ARN 新增至 Lake Formation 資料湖管理員。目前的資料湖管理員可能包含不再存在的無效主體。
<a name="securitylake-lf-admin-invalid-principals"></a>

啟用 Security Lake 或新增 AWS 服務 做為日誌來源時，您可能會收到此錯誤。

若要解決錯誤，請依照下列步驟進行：

1. 開啟 Lake Formation 主控台，網址為 [https://console.aws.amazon.com/lakeformation/](https://console.aws.amazon.com/lakeformation/)。

1. 以管理使用者身分登入。

1. 在導覽窗格**的許可**下，選擇**管理角色和任務**。

1. 在**資料湖管理員**區段中，選擇**選擇管理員**。

1. 清除在 **IAM 中找不到**的標記主體，然後選擇**儲存**。

1. 再次嘗試 Security Lake 操作。

## 具有 Lake Formation 的 Security Lake CreateSubscriber 未建立新的 RAM 資源共享邀請接受
<a name="securitylake-lf-ram-resource-share"></a>

如果您在 Security Lake 中建立 Lake [Formation 訂閱者之前，與 Lake Formation 第 2 版或第 3 版跨帳戶資料共用](https://docs.aws.amazon.com/lake-formation/latest/dg/optimize-ram.html)共用資源，您可能會看到此錯誤。這是因為 Lake Formation 第 2 版和第 3 版跨帳戶共用透過映射具有一個 AWS RAM 資源共用的多個跨帳戶許可授予來最佳化 AWS RAM 資源共用的數量。

請務必檢查資源共用名稱是否具有您在建立訂閱者時指定的外部 ID，且資源共用 ARN 符合`CreateSubscriber`回應中的 ARN。

# 對 Amazon Athena 中的查詢進行故障診斷
<a name="querying-troubleshoot"></a>

使用以下資訊來協助您診斷和修正使用 Athena 查詢存放在 Security Lake S3 儲存貯體中的物件時可能遇到的常見問題。如需更多 Athena 故障診斷主題，請參閱《*Amazon Athena * [Athena 使用者指南》中的 Athena 中的故障診斷](https://docs.aws.amazon.com/athena/latest/ug/troubleshooting-athena.html)一節。

## 查詢不會在資料湖中傳回新物件
<a name="query-not-returning-objects"></a>

即使 Security Lake 的 S3 儲存貯體包含這些物件，您的 Athena 查詢可能不會在資料湖中傳回新物件。如果您已停用 Security Lake，然後再次啟用它，則可能會發生這種情況。因此， AWS Glue 分割區可能無法正確註冊新的物件。

若要解決錯誤，請依照下列步驟進行：

1. 在 https：//[https://console.aws.amazon.com/lambda/](https://console.aws.amazon.com/lambda/) 開啟 AWS Lambda 主控台。

1. 從導覽列的區域選擇器中，選擇啟用 Security Lake 但 Athena 查詢未傳回結果的區域。

1. 從導覽窗格中，選擇**函數**，並根據來源版本從下列清單中選擇函數：
   + `Source version 1 (OCSF 1.0.0-rc.2) ` – **SecurityLake\$1Glue\$1Partition\$1Updater\$1Lambda\$1*≪region>*** 函數。
   + `Source version 2 (OCSF 1.1.0)` – **AmazonSecurityLakeMetastoreManager\$1*≪region>*** 函數。

1. 在**組態**索引標籤上，選擇**觸發。**

1. 選取函數旁的選項，然後選擇**編輯**。

1. 選取**啟用觸發**，然後選擇**儲存**。這會將函數狀態變成**已啟用**。

## 無法存取 AWS Glue 資料表
<a name="access-glue-tables"></a>

查詢存取訂閱者可能無法存取包含 Security Lake 資料的 AWS Glue 資料表。

首先，請確定您已遵循 中概述的步驟[設定跨帳戶資料表共用 （訂閱者步驟）](create-query-subscriber-procedures.md#grant-query-access-subscriber)。

如果訂閱者仍然無法存取 ，請依照下列步驟執行：

1. 在 https：//[https://console.aws.amazon.com/glue/](https://console.aws.amazon.com/glue/) 開啟 AWS Glue 主控台。

1. 從導覽窗格中，選擇 **Data Catalog** 和 **Catalog 設定**。

1. 授予訂閱者使用資源型政策存取 AWS Glue 資料表的許可。如需建立資源型政策的相關資訊，請參閱《 *AWS Glue 開發人員指南*》中的 [的資源型政策範例 AWS Glue](https://docs.aws.amazon.com/glue/latest/dg/security_iam_resource-based-policy-examples.html)。

# 針對 Organizations 問題進行故障診斷
<a name="securitylake-orgs-troubleshoot"></a>

使用以下資訊來協助您診斷和修正使用 Security Lake 和 時可能遇到的常見問題 AWS Organizations。如需更多 Organizations 故障診斷主題，請參閱*AWS Organizations 《 使用者指南*》的[故障診斷](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_troubleshoot.html)一節。

## 呼叫 CreateDataLake 操作時發生存取遭拒錯誤：您的帳戶必須是組織或獨立帳戶的委派管理員帳戶。
<a name="securitylake-orgs-delegated-admin-invalid"></a>

如果您刪除委派管理員帳戶所屬的組織，然後嘗試使用該帳戶透過 Security Lake 主控台或 [CreateDataLake](https://docs.aws.amazon.com/security-lake/latest/APIReference/API_CreateDataLake.html) API 來設定 Security Lake，則可能會收到此錯誤。

若要解決錯誤，請使用來自不同組織或獨立帳戶的委派管理員帳戶。

# 對 Amazon Security Lake 身分和存取進行故障診斷
<a name="security_iam_troubleshoot"></a>

使用以下資訊來協助您診斷和修正使用 Security Lake 和 IAM 時可能遇到的常見問題。

## 我無權在 Security Lake 中執行動作
<a name="security_iam_troubleshoot-no-permissions"></a>

如果 AWS 管理主控台 告知您無權執行 動作，則必須聯絡您的管理員尋求協助。您的管理員是為您提供登入資料的人員。

當 `mateojackson` IAM 使用者嘗試使用主控台檢視有關虛構`subscriber`但沒有虛構`SecurityLake:GetSubscriber`許可的詳細資訊時，會發生下列範例錯誤。

```
User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: YOURSERVICEPREFIX:GetWidget on resource: my-example-widget
```

在此情況下，Mateo 會要求管理員更新其政策，以允許他使用 `SecurityLake:GetSubscriber`動作存取`subscriber`資訊。

## 我想要將許可擴展到 受管政策之外
<a name="security_iam_troubleshoot-mutating"></a>

訂閱者或自訂日誌來源 APIs 建立的所有 IAM 角色都受 `AmazonSecurityLakePermissionsBoundary`受管政策約束。如果您想要將許可擴展到受管政策之外，您可以從角色的許可界限中移除受管政策。不過，與 dataLakes 和訂閱者的變動 Security Lake APIs 互動時，必須連接許可界限，IAM 才能變動 IAM 角色。

## 我未獲授權執行 iam:PassRole
<a name="security_iam_troubleshoot-passrole"></a>

如果您收到錯誤，告知您無權執行 `iam:PassRole`動作，您的政策必須更新，以允許您將角色傳遞至 Security Lake。

有些 AWS 服務 可讓您將現有角色傳遞給該服務，而不是建立新的服務角色或服務連結角色。如需執行此作業，您必須擁有將角色傳遞至該服務的許可。

當名為 的 IAM `marymajor` 使用者嘗試使用主控台在 Security Lake 中執行動作時，會發生下列範例錯誤。但是，動作請求服務具備服務角色授予的許可。Mary 沒有將角色傳遞給服務的許可。

```
User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole
```

在這種情況下，Mary 的政策必須更新，允許她執行 `iam:PassRole` 動作。

如果您需要協助，請聯絡您的 AWS 管理員。您的管理員提供您的簽署憑證。

## 我想要允許 以外的人員 AWS 帳戶 存取我的 Security Lake 資源
<a name="security_iam_troubleshoot-cross-account-access"></a>

您可以建立一個角色，讓其他帳戶中的使用者或您組織外部的人員存取您的資源。您可以指定要允許哪些信任物件取得該角色。針對支援基於資源的政策或存取控制清單 (ACL) 的服務，您可以使用那些政策來授予人員存取您的資源的許可。

如需進一步了解，請參閱以下內容：
+ 若要了解 Security Lake 是否支援這些功能，請參閱 [Security Lake 如何與 IAM 搭配使用](security_iam_service-with-iam.md)。
+ 若要了解如何在您擁有 AWS 帳戶 的 資源之間提供存取權，請參閱《[IAM 使用者指南》中的在您擁有 AWS 帳戶 的另一個 中提供存取權給](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html) *IAM* 使用者。
+ 若要了解如何將資源的存取權提供給第三方 AWS 帳戶，請參閱《*IAM 使用者指南*》中的[將存取權提供給第三方 AWS 帳戶 擁有](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html)。
+ 如需了解如何透過聯合身分提供存取權，請參閱《*IAM 使用者指南*》中的[將存取權提供給在外部進行身分驗證的使用者 (聯合身分)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_federated-users.html)。
+ 如需了解使用角色和資源型政策進行跨帳戶存取之間的差異，請參閱《IAM 使用者指南》**中的 [IAM 中的跨帳戶資源存取](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html)。