

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

# 为独立账户启用 S3 防护
<a name="data-source-configure"></a>

独立账户拥有在特定账户中启用或禁用保护计划的决定 AWS 区域。 AWS 账户 

如果您的账户通过或通过 AWS Organizations邀请方式与 GuardDuty 管理员帐户关联，则此部分不适用于您的账户。有关更多信息，请参阅 [在多账户环境中配置 S3 防护](s3-multiaccount.md)。

启用 S3 保护后， GuardDuty 将开始监控您账户中 S3 存储桶 AWS CloudTrail 的数据事件。

选择您的首选访问方法，为独立账户配置 S3 保护。

------
#### [ Console ]

1. 登录 AWS 管理控制台 并打开 GuardDuty 控制台，网址为[https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/)。

1. 在右上角的**区域**选择器中，选择要启用 S3 防护的区域。

1. 在导航窗格中，选择 **S3 保护**。

1. **S3 保护**页面提供您账户的 S3 保护的当前状态。选择**启用**或**禁用**，可随时启用或禁用 S3 保护。

1. 选择**确认**以确认您的选择。

------
#### [ API/CLI ]

使用当前区域的有效检测器 ID 运行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html)，传递 `features` 对象 `name`，并分别将 `S3_DATA_EVENTS` 设置为 `ENABLED`，从而启用 S3 防护。

**注意**  
要查找您的账户和当前区域的，请查看[https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/)控制台中的 **“设置**” 页面，或者运行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html)API。`detectorId`

或者，你可以使用 AWS Command Line Interface。要启用 S3 保护，请运行以下命令，然后{{12abc34d567e8fa901bc2d34e56789f0}}替换为账户的检测器 ID 和{{us-east-1}}要启用 S3 保护的区域。

```
aws guardduty update-detector --detector-id {{12abc34d567e8fa901bc2d34e56789f0}} --region {{us-east-1}} --features '[{"Name" : "S3_DATA_EVENTS", "Status" : "ENABLED"}]'
```

------