在 Security Lake 中建立具有資料存取權的訂閱者的先決條件 - Amazon Security Lake

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

在 Security Lake 中建立具有資料存取權的訂閱者的先決條件

您必須先完成下列先決條件,才能在 Security Lake 中建立具有資料存取權的訂閱者。

驗證許可

若要驗證您的許可,請使用 IAM 來檢閱連接至 IAM 身分的 IAM 政策。然後,將這些政策中的資訊與下列 (許可) 動作清單進行比較,您必須在將新資料寫入資料湖時通知訂閱者。

您需要許可才能執行下列動作:

  • iam:CreateRole

  • iam:DeleteRolePolicy

  • iam:GetRole

  • iam:PutRolePolicy

  • lakeformation:GrantPermissions

  • lakeformation:ListPermissions

  • lakeformation:RegisterResource

  • lakeformation:RevokePermissions

  • ram:GetResourceShareAssociations

  • ram:GetResourceShares

  • ram:UpdateResourceShare

除了上述清單之外,您也需要執行下列動作的許可:

  • events:CreateApiDestination

  • events:CreateConnection

  • events:DescribeRule

  • events:ListApiDestinations

  • events:ListConnections

  • events:PutRule

  • events:PutTargets

  • s3:GetBucketNotification

  • s3:PutBucketNotification

  • sqs:CreateQueue

  • sqs:DeleteQueue

  • sqs:GetQueueAttributes

  • sqs:GetQueueUrl

  • sqs:SetQueueAttributes

取得訂閱者的外部 ID

若要建立訂閱者,除了訂閱者的 AWS 帳戶 ID 之外,您也需要取得其外部 ID。外部 ID 是訂閱者提供給您的唯一識別符。Security Lake 會將外部 ID 新增至其建立的訂閱者 IAM 角色。當您在 Security Lake 主控台中、透過 API 或 建立訂閱者時,您可以使用外部 ID AWS CLI。

如需外部 IDs的詳細資訊,請參閱《IAM 使用者指南》中的如何在將 AWS 資源的存取權授予第三方時使用外部 ID

重要

如果您計劃使用 Security Lake 主控台來新增訂閱者,您可以略過下一個步驟並繼續 在 Security Lake 中建立具有資料存取權的訂閱者。Security Lake 主控台提供簡化的入門程序,並建立所有必要的 IAM 角色,或代表您使用現有的角色。

如果您打算使用 Security Lake API AWS CLI 或新增訂閱者,請繼續下一個步驟來建立 IAM 角色以叫用 EventBridge API 目的地。

建立 IAM 角色以叫用 EventBridge API 目的地 (API AWS CLI和僅限步驟)

如果您透過 API 或 使用 Security Lake AWS CLI,請在 AWS Identity and Access Management (IAM) 中建立角色,授予 Amazon EventBridge 呼叫 API 目的地的許可,並將物件通知傳送至正確的 HTTPS 端點。

建立此 IAM 角色之後,您需要角色的 Amazon Resource Name (ARN) 才能建立訂閱者。如果訂閱者從 Amazon Simple Queue Service (Amazon SQS) 佇列輪詢資料或直接從 查詢資料,則不需要此 IAM 角色 AWS Lake Formation。如需此類型資料存取方法 (存取類型) 的詳細資訊,請參閱管理 Security Lake 訂閱者的查詢存取權

將下列政策連接至您的 IAM 角色:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowInvokeApiDestination", "Effect": "Allow", "Action": [ "events:InvokeApiDestination" ], "Resource": [ "arn:aws:events:{us-west-2}:{123456789012}:api-destination/AmazonSecurityLake*/*" ] } ] }

將下列信任政策連接至您的 IAM 角色,以允許 EventBridge 擔任該角色:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowEventBridgeToAssume", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }

Security Lake 會自動建立 IAM 角色,允許訂閱者從資料湖讀取資料 (如果這是偏好的通知方法,則從 Amazon SQS 佇列輪詢事件)。此角色受到名為 的 AWS 受管政策保護AmazonSecurityLakePermissionsBoundary