

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

# 启用 Detective 与安全湖的集成
<a name="integrating-securitylake-tutorial"></a>

要将 Detective 与 Security Lake 集成，你必须完成以下步骤。

1. [开始之前](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#Prerequisites)

   使用 Organizations 管理账户来为您的组织指定一个委托的 Security Lake 管理员。确保安全湖已启用，并确认安全湖正在从 AWS CloudTrail 管理事件和亚马逊虚拟私有云 (Amazon VPC) 流日志中收集日志和事件。

   为了与安全参考架构保持一致，Detective 建议使用日志存档帐户，并推迟使用安全工具帐户进行 Security Lake 部署。

1. [创建安全湖订阅者](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#securitylake-subscriber)

   要使用来自 Amazon Security Lake 的日志和事件，您必须为 Security Lake 订阅用户。按照以下步骤向 Detective 账户管理员授予查询权限。

1. 为您的 IAM 身份添加所需的 AWS Identity and Access Management (IAM) 权限。
   + 添加以下权限以创建 Detective 与 Security Lake 集成：
     + 将这些 AWS 身份和访问管理 (IAM) 权限附加到您的 IAM 身份。有关详细信息，请参阅[向您的账户添加所需的 IAM 权限](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#iam-permissions)部分。
     + 将此 IAM 策略添加到您计划用于传递 CloudFormation 服务角色的 IAM 委托人中。有关更多详细信息，请参阅向您的 [IAM 委托人添加权限](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#cloud-formation-template)部分。
   + 如果您已经将 Detective 与 Security Lake 集成，则要使用集成，请将这些 (IAM) 权限附加到您的 IAM 身份。有关详细信息，请参阅[向您的账户添加所需的 IAM 权限](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#iam-permissions)部分。

1. [接受资源共享 ARN 邀请并启用集成](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#resource-share-arn)

使用 AWS CloudFormation 模板设置创建和管理 Security Lake 订阅者的查询访问权限所需的参数。有关创建堆栈的详细步骤，请参阅[使用 AWS CloudFormation 模板创建堆栈](https://docs.aws.amazon.com//detective/latest/userguide/securitylake-integration.html#cloud-formation-template)。创建完堆栈后，启用集成。

要演示如何使用 Detective 控制台将 Amazon Detective 与 Amazon Security Lake 集成，请观看以下视频：

[![AWS Videos](http://img.youtube.com/vi/https://www.youtube.com/embed/73ZurSZCZwA/0.jpg)](http://www.youtube.com/watch?v=https://www.youtube.com/embed/73ZurSZCZwA)
