

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

# 在多帳戶環境中啟用 S3 保護
<a name="s3-multiaccount"></a>

在多帳戶環境中，只有委派的 GuardDuty 管理員帳戶可以選擇為其 AWS 組織中的成員帳戶設定 （啟用或停用） S3 保護。GuardDuty 成員帳戶無法從其帳戶修改此組態。委派的 GuardDuty 管理員帳戶會使用 管理其成員帳戶 AWS Organizations。委派的 GuardDuty 管理員帳戶可以選擇在所有帳戶、僅新帳戶或組織中沒有帳戶上自動啟用 S3 保護。如需詳細資訊，請參閱[透過 AWS Organizations管理帳戶](guardduty_organizations.md)。

## 啟用委派 GuardDuty 管理員帳戶的 S3 保護
<a name="configure-s3-pro-delegatedadmin"></a>

選擇您偏好的存取方法，為委派的 GuardDuty 管理員帳戶啟用 S3 保護。

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

1. 前往 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 開啟 GuardDuty 主控台。

1. 在導覽窗格中，選擇 **S3 保護**。

1. 在 **S3 保護**頁面上，選擇**編輯**。

1. 執行以下任意一項：

**使用**為所有帳戶啟用****
   + 選擇**為所有帳戶啟用**。這將為 AWS 組織中所有作用中的 GuardDuty 帳戶啟用保護計畫，包括加入組織的新帳戶。
   + 選擇**儲存**。

**使用**手動設定帳戶****
   + 若要僅針對委派的 GuardDuty 管理員帳戶啟用保護計畫，請選擇**手動設定帳戶**。
   + 在**委派的 GuardDuty 管理員帳戶 （此帳戶）** 區段下選擇**啟用**。
   + 選擇**儲存**。

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

[https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateDetector.html) 使用目前區域的委派 GuardDuty 管理員帳戶的偵測器 ID 執行 ，並以 `name` `S3_DATA_EVENTS`和 `status`身分傳遞`features`物件`ENABLED`。

或者，您可以使用 設定 S3 保護 AWS Command Line Interface。執行下列命令，並確保將 {{12abc34d567e8fa901bc2d34e56789f0}} 取代為目前區域的委派 GuardDuty 管理員帳戶的偵測器 ID。

若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [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。

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

------

## 為組織中的所有成員帳戶自動啟用 S3 保護
<a name="s3-autoenable"></a>

選擇您偏好的存取方法，為委派的 GuardDuty 管理員帳戶啟用 S3 保護。

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

1. 前往 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 開啟 GuardDuty 主控台。

   使用您的管理員帳戶登入。

1. 執行以下任意一項：

**使用 **S3 保護**頁面**

   1. 在導覽窗格中，選擇 **S3 保護**。

   1. 選擇**為所有帳戶啟用**。此動作會自動為組織中的現有帳戶和新帳戶啟用 S3 保護。

   1. 選擇**儲存**。
**注意**  
最多可能需要 24 小時才會更新成員帳戶的組態。

**使用**帳戶**頁面**

   1. 在導覽窗格中，選擇**帳戶**。

   1. 在**帳戶**頁面上，選擇**自動啟用**偏好設定，然後再**透過邀請新增帳戶**。

   1. 在**管理自動啟用偏好設定**視窗中，選擇 **S3 保護**下的**為所有帳戶啟用**。

   1. 選擇**儲存**。

   如果您無法使用**為所有帳戶啟用**選項，請參閱 [在成員帳戶中選擇性地啟用 S3 保護](#s3-enable-members)。

------
#### [ API/CLI ]
+ 若要為您的成員帳戶選擇性地啟用 S3 保護，請使用您自己的{{偵測器 ID}} 叫用 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html) API 操作。
+ 以下範例顯示如何為單一成員帳戶啟用 S3 保護。請務必將 {{12abc34d567e8fa901bc2d34e56789f0}} 取代為委派 `detector-id` GuardDuty 管理員帳戶的 和 {{111122223333}}。

  若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [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。

  ```
  aws guardduty update-member-detectors --detector-id {{12abc34d567e8fa901bc2d34e56789f0}} --account-ids {{111122223333}} --features '[{"name": "S3_DATA_EVENTS", "status": "{{ENABLED}}"}]'
  ```
**注意**  
您也可以傳遞以空格分隔的帳戶 ID 清單。
+ 當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。

------

## 為所有現有作用中成員帳戶啟用 S3 保護
<a name="enable-for-all-existing-members"></a>

選擇您偏好的存取方式，為組織中的所有現有作用中成員帳戶啟用 S3 保護。

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

1. 登入 AWS Management Console ，並在 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/)：// 開啟 GuardDuty 主控台。

   使用委派的 GuardDuty 管理員帳戶登入資料登入。

1. 在導覽窗格中，選擇 **S3 保護**。

1. 在 **S3 保護**頁面上，您可以檢視組態的目前狀態。在**作用中成員帳戶**區段下，選擇**動作**。

1. 從**動作**下拉式選單中，選擇**為所有作用中的成員帳戶啟用**。

1. 選擇**確認**。

------
#### [ API/CLI ]
+ 若要為您的成員帳戶選擇性地啟用 S3 保護，請使用您自己的{{偵測器 ID}} 叫用 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetectors.html) API 操作。
+ 以下範例顯示如何為單一成員帳戶啟用 S3 保護。請務必將 {{12abc34d567e8fa901bc2d34e56789f0}} 取代為委派 `detector-id` GuardDuty 管理員帳戶的 和 {{111122223333}}。

  若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [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。

  ```
  aws guardduty update-member-detectors --detector-id {{12abc34d567e8fa901bc2d34e56789f0}} --account-ids {{111122223333}} --features '[{"name": "S3_DATA_EVENTS", "status": "{{ENABLED}}"}]'
  ```
**注意**  
您也可以傳遞以空格分隔的帳戶 ID 清單。
+ 當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。

------

## 為新成員帳戶自動啟用 S3 保護
<a name="auto-enable-s3-pro-new-members"></a>

選擇您偏好的存取方式，為加入組織的新帳戶啟用 S3 保護。

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

委派的 GuardDuty 管理員帳戶可以使用 **S3 保護**或帳戶頁面，透過主控台為組織中的新成員**帳戶**啟用 。

**為新成員帳戶自動啟用 S3 保護**

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

   請務必使用委派的 GuardDuty 管理員帳戶登入資料。

1. 執行以下任意一項：
   + 使用 **S3 保護**頁面：

     1. 在導覽窗格中，選擇 **S3 保護**。

     1. 在 **S3 保護**頁面上，選擇**編輯**。

     1. 選擇**手動設定帳戶**。

     1. 選取**為新成員帳戶自動啟用**。此步驟可確保每當有新帳戶加入您的組織時，S3 保護都會自動為其帳戶啟用。只有組織委派的 GuardDuty 管理員帳戶可以修改此組態。

     1. 選擇**儲存**。
   + 使用**帳戶**頁面：

     1. 在導覽窗格中，選擇**帳戶**。

     1. 在**帳戶**頁面上，選擇**自動啟用**偏好設定。

     1. 在**管理自動啟用偏好設定**視窗中，選擇 **S3 保護**下的**為新帳戶啟用**。

     1. 選擇**儲存**。

------
#### [ API/CLI ]
+ 若要為您的成員帳戶選擇性地啟用 S3 保護，請使用您自己的{{偵測器 ID}} 叫用 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html) API 操作。
+ 以下範例顯示如何為單一成員帳戶啟用 S3 保護。設定偏好設定，以在該區域中為加入組織的新帳戶 (`NEW`)、所有帳戶 (`ALL`) 或非組織帳戶 (`NONE`) 自動啟用或停用保護計畫。如需詳細資訊，請參閱 [autoEnableOrganizationMembers](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateOrganizationConfiguration.html#guardduty-UpdateOrganizationConfiguration-request-autoEnableOrganizationMembers)。根據您的偏好設定，您可能需要使用 `ALL` 或 `NONE` 取代 `NEW`。

  若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [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。

  ```
  aws guardduty update-organization-configuration --detector-id {{12abc34d567e8fa901bc2d34e56789f0}} --auto-enable --features '[{"Name": "S3_DATA_EVENTS", "autoEnable": "{{NEW}}"}]'
  ```
+ 當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。

------

## 在成員帳戶中選擇性地啟用 S3 保護
<a name="s3-enable-members"></a>

選擇您偏好的存取方法，以選擇性地為成員帳戶啟用 S3 保護。

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

1. 前往 [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) 開啟 GuardDuty 主控台。

   請務必使用委派的 GuardDuty 管理員帳戶登入資料。

1. 在導覽窗格中，選擇**帳戶**。

   在**帳戶**頁面上，檢閱 **S3 保護**資料欄，了解您的成員帳戶的狀態。

1. 

**選擇性地啟用 S3 保護**

   選取您要為其啟用 S3 保護的帳戶。您可以一次選取多個帳戶。在**編輯保護計畫**下拉式選單中，選擇 **S3Pro**，然後選擇適當的選項。

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

若要為您的成員帳戶選擇性地啟用 S3 保護，請使用您自己的偵測器 ID 執行 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetector.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdateMemberDetector.html) API 操作。以下範例顯示如何為單一成員帳戶啟用 S3 保護。若要停用，請使用 `false` 取代 `true`。

若要尋找`detectorId`您帳戶和目前區域的 ，請參閱 [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。

```
 aws guardduty update-member-detectors --detector-id {{12abc34d567e8fa901bc2d34e56789f0}} --account-ids {{123456789012}} --features '[{"Name" : "S3_DATA_EVENTS", "Status" : "ENABLED"}]'
```

**注意**  
您也可以傳遞以空格分隔的帳戶 ID 清單。

當程式碼成功執行時，會返回一個空白 `UnprocessedAccounts` 清單。如果變更帳戶的偵測器設定時發生任何問題，則會列出該帳戶 ID 以及問題摘要。

**注意**  
如果您使用指令碼建立新帳戶，並且想要在新帳戶中停用 S3 保護，則可以使用選用的 `dataSources` 物件修改 [https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreateDetector.html](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreateDetector.html) API 操作，如本主題所述。

------