

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

# 在 S3 恶意软件防护中监控 S3 对象扫描
<a name="monitoring-malware-protection-s3-scans-gdu"></a>

使用带有 GuardDuty 检测器 ID 的 S3 恶意软件防护时，如果您的 Amazon S3 对象可能是恶意的，则 GuardDuty 会生成[S3 恶意软件防护调查发现类型](gdu-malware-protection-s3-finding-types.md)。使用 GuardDuty 控制台和 APIs，您可以查看生成的调查结果。有关有助了解此调查发现类型的信息，请参阅[调查发现详细信息](guardduty_findings-summary.md)。

在未启用 GuardDuty （无检测器 ID）的情况下对 S3 使用恶意软件防护时，即使扫描的 Amazon S3 对象可能是恶意的，也 GuardDuty 无法生成任何发现。

**Topics**
+ [可能的 S3 对象扫描状态和结果状态](#s3-object-scan-result-value-malware-protection)
+ [使用 Amazon 监控 S3 对象扫描 EventBridge](monitor-with-eventbridge-s3-malware-protection.md)
+ [使用 GuardDuty 托管标签监控 S3 对象扫描](monitor-enable-s3-object-tagging-malware-protection.md)
+ [中的 S3 对象扫描状态指标 CloudWatch](monitor-cloudwatch-metrics-s3-malware-protection.md)

## 可能的 S3 对象扫描状态和结果状态
<a name="s3-object-scan-result-value-malware-protection"></a>

本节介绍可能的 S3 对象扫描状态值和扫描结果值。

S3 对象扫描状态指示恶意软件扫描的状态，例如已完成、已跳过或失败。

S3 对象恶意软件扫描结果状态根据扫描状态值指示扫描结果。每个恶意软件扫描结果状态值都映射一个扫描状态。

以下列表提供了可能的 S3 对象扫描结果值。如果您启用了标记，则可以通过[使用 S3 对象标签](monitor-enable-s3-object-tagging-malware-protection.md)来监控扫描结果。扫描后，标签值将具有以下扫描结果值之一。

**S3 对象潜在恶意软件扫描结果状态值**
+ `NO_THREATS_FOUND`— 未 GuardDuty 检测到与扫描对象相关的潜在威胁。
+ `THREATS_FOUND`— GuardDuty 检测到与扫描对象相关的潜在威胁。
+ `UNSUPPORTED`：S3 恶意软件防护会因几个原因跳过扫描。可能的原因包括文件受密码保护、归档文件压缩率极高、[S3 恶意软件防护配额](malware-protection-s3-quotas-guardduty.md)，以及可能不支持某些 Amazon S3 功能。有关更多信息，请参阅 [S3 恶意软件防护的功能](s3-malware-protection-capability.md)。
+ `ACCESS_DENIED`— GuardDuty 无法访问此对象进行扫描。检查与此存储桶关联的 IAM 角色权限。有关更多信息，请参阅 [创建或更新 IAM 角色策略](malware-protection-s3-iam-policy-prerequisite.md)。

  如果您启用了扫描后 S3 对象标记，请参阅[对 S3 对象扫描后标记失败问题进行故障排除](troubleshoot-s3-post-scan-tag-failures.md)。
+ `FAILED`— 由于内部错误， GuardDuty 无法对此对象执行恶意软件扫描。

以下列表提供了可能的 S3 对象扫描状态值及其与 S3 对象扫描结果的映射。

**可能的 S3 对象扫描状态值**
+ **已完成**：扫描已成功完成并指示 S3 对象是否存在恶意软件。在此场景中，可能的 S3 对象扫描结果值或为 `THREATS_FOUND` 或 `NO_THREATS_FOUND`。
+ **已跳过** — GuardDuty 如果扫描此 S3 对象不受 S3 恶意软件防护支持，或者 GuardDuty无法访问选定存储桶中上传的 S3 对象，则跳过恶意软件扫描。

  在此场景中，可能的 S3 对象扫描结果值或为 `UNSUPPORTED` 或 `ACCESS_DENIED`。

  GuardDuty 如果所需的 IAM 角色被删除，也会跳过扫描。
+ **失败** — 与 S3 对象扫描结果值类似`FAILED`，此扫描状态表示 GuardDuty 由于内部错误而无法对 S3 对象执行恶意软件扫描。

# 使用 Amazon 监控 S3 对象扫描 EventBridge
<a name="monitor-with-eventbridge-s3-malware-protection"></a>

*Amazon EventBridge* 是一项无服务器事件总线服务，可以轻松地将您的应用程序与来自各种来源的数据连接起来。 EventBridge 提供来自您自己的应用程序、 Software-as-a-Service (SaaS) 应用程序和 AWS 服务的实时数据流，并将这些数据路由到 Lambda 等目标。这使您能够监控服务中发生的事件，并构建事件驱动的架构。有关更多信息，请参阅 [Amazon EventBridge 用户指南](https://docs.aws.amazon.com/eventbridge/latest/userguide/)。

作为受 S3 恶意软件防护保护的 S3 存储桶的所有者账户，在以下情况下向默认事件总线 GuardDuty 发布 EventBridge 通知：
+ 任何受保护存储桶的**恶意软件防护计划资源状态**会发生变化。有关不同状态的更多信息，请参阅[查看和了解受保护的存储桶状态](malware-protection-s3-bucket-status-gdu.md)。

  要为资源状态设置 Amazon EventBridge (EventBridge) 规则，请参阅[恶意软件防护计划资源状态](#resource-status-malware-protection-s3-ev)。
+ S **3 对象扫描结果**将发布到您的默认 EventBridge 事件总线。

  `s3Throttled` 字段指示在 Amazon S3 存储桶中上传或检索存储时是否出现延迟。`true` 值指示存在延迟，`false` 指示没有延迟。

  如果扫描结果的 `s3Throttled` 为 `true`，则 Amazon S3 会提供有关前缀设置方式的建议，以帮助您减少每个前缀的每秒事务处理量（TPS）。有关更多信息，请参阅《Amazon S3 用户指南》中的[最佳实践设计模式：优化 Amazon S3 性能](https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance.html)**。

  有关为 S3 对象扫描结果设置 Amazon EventBridge (EventBridge) 规则的信息，请参阅[S3 对象扫描结果](#s3-object-scan-status-malware-protection-s3-ev)。
+ 由于以下原因，出现**扫描后标记失败事件**：
  + IAM 角色缺少标记对象的权限。

    该[添加 IAM 策略权限](malware-protection-s3-iam-policy-prerequisite.md#attach-iam-policy-s3-malware-protection)模板包括为对象 GuardDuty 添加标签的权限。
  + IAM 角色中指定的存储桶资源或对象已不再存在。
  + 关联的 S3 对象已达到最大标签限制。有关标签限制的更多信息，请参阅《Amazon S3 用户指南》中的[使用标签对存储进行分类](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)**。

  要为扫描后标签失败事件设置 Amazon EventBridge (EventBridge) 规则，请参阅[扫描后标记失败事件](#post-tag-failure-malware-protection-s3-ev)。

## 设置 EventBridge 规则
<a name="set-up-malware-protection-s3-eventbridge-rules"></a>

您可以在账户中设置 EventBridge 规则，将资源状态、扫描后标签失败事件或 S3 对象扫描结果发送给其他 AWS 服务人。作为委托 GuardDuty 管理员帐户，当恶意软件防护计划资源状态发生变化时，您将收到恶意软件防护计划资源状态通知。

将适用标准 EventBridge 定价。有关更多信息，请参阅 [Amazon EventBridge 定价](https://aws.amazon.com/eventbridge/pricing/)。

在该示例中，显示的所有值*red*均为占位符。这些值将根据您账户中的值以及是否检测到恶意软件而改变。

**Topics**
+ [恶意软件防护计划资源状态](#resource-status-malware-protection-s3-ev)
+ [S3 对象扫描结果](#s3-object-scan-status-malware-protection-s3-ev)
+ [扫描后标记失败事件](#post-tag-failure-malware-protection-s3-ev)

### 恶意软件防护计划资源状态
<a name="resource-status-malware-protection-s3-ev"></a>

您可以根据以下场景创建 EventBridge 事件模式：

**可能的 `detail-type` 值**
+ `"GuardDuty Malware Protection Resource Status Active"`
+ `"GuardDuty Malware Protection Resource Status Warning"`
+ `"GuardDuty Malware Protection Resource Status Error"`

**事件模式**

```
{
      "detail-type": ["potential detail-type"],
      "source": ["aws.guardduty"]
}
```

**`GuardDuty Malware Protection Resource Status Active` 示例通知架构**：

```
{
    "version": "0",
    "id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718",
    "detail-type": "GuardDuty Malware Protection Resource Status Active",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2017-12-22T18:43:48Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "eventTime": "2024-02-28T01:01:01Z",
        "s3BucketDetails": {
            "bucketName": "amzn-s3-demo-bucket"
        },
        "resourceStatus": "ACTIVE"
    }
}
```

**`GuardDuty Malware Protection Resource Status Warning` 示例通知架构**：

```
{
    "version": "0",
    "id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718",
    "detail-type": "GuardDuty Malware Protection Resource Status warning",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2017-12-22T18:43:48Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "eventTime": "2024-02-28T01:01:01Z",
        "s3BucketDetails": {
            "bucketName": "amzn-s3-demo-bucket"
        },
        "resourceStatus": "WARNING",
        "statusReasons": [
         {
            "code": "INSUFFICIENT_TEST_OBJECT_PERMISSIONS"
         }
        ]
    }
}
```

**`GuardDuty Malware Protection Resource Status Error` 示例通知架构**：

```
{
    "version": "0",
    "id": "fc7a35b7-83bd-3c1f-ecfa-1b8de9e7f7d2",
    "detail-type": "GuardDuty Malware Protection Resource Status Error",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2017-12-22T18:43:48Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "eventTime": "2024-02-28T01:01:01Z",
        "s3BucketDetails": {
            "bucketName": "amzn-s3-demo-bucket"
        },
        "resourceStatus": "ERROR",
        "statusReasons": [
        {
            "code": "EVENTBRIDGE_MANAGED_EVENTS_DELIVERY_DISABLED"
        }
       ]
    }
}
```

`statusReasons` 值将根据 `resourceStatus` `ERROR` 背后的原因填充。

有关以下警告和错误的故障排除步骤的信息，请参阅[恶意软件防护计划状态故障排除](troubleshoot-s3-malware-protection-status-errors.md)。

### S3 对象扫描结果
<a name="s3-object-scan-status-malware-protection-s3-ev"></a>

```
{
  "detail-type": ["GuardDuty Malware Protection Object Scan Result"],
  "source": ["aws.guardduty"]
}
```

**`NO_THREATS_FOUND` 示例通知架构**：

```
{
    "version": "0",
    "id": "72c7d362-737a-6dce-fc78-9e27a0171419",
    "detail-type": "GuardDuty Malware Protection Object Scan Result",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-02-28T01:01:01Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "scanStatus": "COMPLETED",
        "resourceType": "S3_OBJECT",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "APKAEIBAERJR2EXAMPLE",
            "eTag": "ASIAI44QH8DHBEXAMPLE",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "scanResultDetails": {
            "scanResultStatus": "NO_THREATS_FOUND",
            "threats": null
        }
    }
}
```

**`THREATS_FOUND` 示例通知架构**：

```
{
    "version": "0",
    "id": "72c7d362-737a-6dce-fc78-9e27a0171419",
    "detail-type": "GuardDuty Malware Protection Object Scan Result",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-02-28T01:01:01Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "scanStatus": "COMPLETED",
        "resourceType": "S3_OBJECT",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "APKAEIBAERJR2EXAMPLE",
            "eTag": "ASIAI44QH8DHBEXAMPLE",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "scanResultDetails": {
            "scanResultStatus": "THREATS_FOUND",
            "threats": [
                {
                    "name": "EICAR-Test-File (not a virus)"
                }
            ]
        }
    }
}
```

**注意**  
`scanResultDetails.Threats` 字段仅包含一种威胁。默认情况下，S3 恶意软件防护扫描会报告第一个检测到的威胁。此后，`scanStatus` 将设置为 `COMPLETED`。

**`UNSUPPORTED` 扫描结果状态的示例通知架构（已跳过）**：

```
{
    "version": "0",
    "id": "72c7d362-737a-6dce-fc78-9e27a0EXAMPLE",
    "detail-type": "GuardDuty Malware Protection Object Scan Result",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-02-28T01:01:01Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "scanStatus": "SKIPPED",
        "resourceType": "S3_OBJECT",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "APKAEIBAERJR2EXAMPLE",
            "eTag": "ASIAI44QH8DHBEXAMPLE",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "scanResultDetails": {
            "scanResultStatus": "UNSUPPORTED",
            "threats": null
        }
    }
}
```

**`ACCESS_DENIED` 扫描结果状态的示例通知架构（已跳过）**：

```
{
    "version": "0",
    "id": "72c7d362-737a-6dce-fc78-9e27a0EXAMPLE",
    "detail-type": "GuardDuty Malware Protection Object Scan Result",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-02-28T01:01:01Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "scanStatus": "SKIPPED",
        "resourceType": "S3_OBJECT",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "APKAEIBAERJR2EXAMPLE",
            "eTag": "ASIAI44QH8DHBEXAMPLE",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "scanResultDetails": {
            "scanResultStatus": "ACCESS_DENIED",
            "threats": null
        }
    }
}
```

**`FAILED` 扫描结果状态的示例通知架构**：

```
{
    "version": "0",
    "id": "72c7d362-737a-6dce-fc78-9e27a0EXAMPLE",
    "detail-type": "GuardDuty Malware Protection Object Scan Result",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-02-28T01:01:01Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "scanStatus": "FAILED",
        "resourceType": "S3_OBJECT",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "APKAEIBAERJR2EXAMPLE",
            "eTag": "ASIAI44QH8DHBEXAMPLE",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "scanResultDetails": {
            "scanResultStatus": "FAILED",
            "threats": null
        }
    }
}
```

### 扫描后标记失败事件
<a name="post-tag-failure-malware-protection-s3-ev"></a>

**事件模式**：

```
{
      "detail-type": "GuardDuty Malware Protection Post Scan Action Failed",
      "source": "aws.guardduty"
 }
```

**`ACCESS_DENIED` 示例通知架构**：

```
{
    "version": "0",
    "id": "746acd83-d75c-5b84-91d2-dad5f13ba0d7",
    "detail-type": "GuardDuty Malware Protection Post Scan Action Failed",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-06-10T16:16:08Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "eventTime": "2024-06-10T16:16:08Z",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "2024-03-10-16-16-00-7D723DE8DBE9Y2E0",
            "eTag": "0e9eeec810ad8b61d69112c15c2a5hb6",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "postScanActions": [{
            "actionType": "TAGGING",
            "failureReason": "ACCESS_DENIED"
        }]
    }
}
```

**`MAX_TAG_LIMIT_EXCEEDED` 示例通知架构**：

```
{
    "version": "0",
    "id": "746acd83-d75c-5b84-91d2-dad5f13ba0d7",
    "detail-type": "GuardDuty Malware Protection Post Scan Action Failed",
    "source": "aws.guardduty",
    "account": "111122223333",
    "time": "2024-06-10T16:16:08Z",
    "region": "us-east-1",
    "resources": ["arn:aws:guardduty:us-east-1:111122223333:malware-protection-plan/b4c7f464ab3a4EXAMPLE"],
    "detail": {
        "schemaVersion": "1.0",
        "eventTime": "2024-06-10T16:16:08Z",
        "s3ObjectDetails": {
            "bucketName": "amzn-s3-demo-bucket",
            "objectKey": "2024-03-10-16-16-00-7D723DE8DBE9Y2E0",
            "eTag": "0e9eeec810ad8b61d69112c15c2a5hb6",
            "versionId" : "d41d8cd98f00b204e9800998eEXAMPLE",
            "s3Throttled": false
        },
        "postScanActions": [{
            "actionType": "TAGGING",
            "failureReason": "MAX_TAG_LIMIT_EXCEEDED"
        }]
    }
}
```

要对这些失败原因进行故障排除，请参阅[对 S3 对象扫描后标记失败问题进行故障排除](troubleshoot-s3-post-scan-tag-failures.md)。

# 使用 GuardDuty 托管标签监控 S3 对象扫描
<a name="monitor-enable-s3-object-tagging-malware-protection"></a>

使用启用标记选项， GuardDuty 以便在完成恶意软件扫描后向您的 Amazon S3 对象添加标签。

**启用标记的注意事项**
+  GuardDuty 标记您的 S3 对象时会产生相关的使用成本。有关更多信息，请参阅 [S3 恶意软件防护的定价和使用成本](pricing-malware-protection-for-s3-guardduty.md)。
+ 您必须保留与该存储桶关联的首选 IAM 角色所需的标签权限；否则，将 GuardDuty 无法向扫描的对象添加标签。该 IAM 角色已经包含向已扫描对象添加标签的权限。有关更多信息，请参阅 [创建或更新 IAM 角色策略](malware-protection-s3-iam-policy-prerequisite.md)。
+ 默认情况下，您最多可以将 10 个标签关联到一个 S3 对象。有关更多信息，请参阅 [使用基于标签的访问控制（TBAC）](tag-based-access-s3-malware-protection.md)。

为 S3 存储桶或特定前缀启用标记后，任何新上传的已扫描对象都将具有以下键值对格式的关联标签：

`GuardDutyMalwareScanStatus`:`Scan-Result-Status`

有关可能的标签值的信息，请参阅 [可能的 S3 对象扫描状态和结果状态](monitoring-malware-protection-s3-scans-gdu.md#s3-object-scan-result-value-malware-protection)。

# 对 S3 恶意软件防护中的 S3 对象扫描后标记失败问题进行故障排除
<a name="troubleshoot-s3-post-scan-tag-failures"></a>

仅当您在受保护的存储桶中[为已扫描对象启用标记](enable-malware-protection-s3-bucket.md#tag-scanned-objects-s3-malware-protection)时，本部分的内容才适用于您。

 GuardDuty 尝试向扫描的 S3 对象添加标签时，标记操作可能会导致失败。存储桶发生这种情况的可能原因为 `ACCESS_DENIED` 和 `MAX_TAG_LIMIT_EXCEEDED`。使用以下主题来了解这些扫描后标记失败的可能原因并对其进行故障排除。

**ACCESS\$1DENIED**  
以下列表提供了可能导致此问题的可能原因：  
+ 用于此受保护的 S3 存储桶的 IAM 角色缺少**AllowPostScanTag**权限。验证关联的 IAM 角色是否使用的是此存储桶策略。有关更多信息，请参阅 [创建或更新 IAM 角色策略](malware-protection-s3-iam-policy-prerequisite.md)。
+ 受保护的 S3 存储桶策略不允许 GuardDuty 向此对象添加标签。
+ 已扫描的 S3 对象已不再存在。

**MAX\$1TAG\$1LIMIT\$1EXCEEDED**  
默认情况下，您最多可以将 10 个标签关联到一个 S3 对象。有关更多信息，请参阅下的 “ GuardDuty 向 S3 对象添加标签的注意事项” [为已扫描对象启用标记](enable-malware-protection-s3-bucket.md#tag-scanned-objects-s3-malware-protection)。

# 中的 S3 对象扫描状态指标 CloudWatch
<a name="monitor-cloudwatch-metrics-s3-malware-protection"></a>

您可以使用 GuardDuty 进行监控 CloudWatch，它收集原始数据并将其处理为可读的近乎实时的指标。这些统计数据会保留 15 个月，以便您可以访问历史信息，并更好地了解 S3 恶意软件防护的执行情况。还可以设置特定阈值监视警报，在达到对应阈值时发送通知或采取行动。有关更多信息，请参阅 [Amazon CloudWatch 用户指南](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)。

S3 恶意软件防护 CloudWatch 指标可在资源级别获得。您可以分别查询每个受保护资源的此类指标。此类指标在 `AWS/GuardDuty/MalwareProtection` 命名空间中报告。您可以在特定资源上设置警报来监控安全状况。


| 
| 
| **恶意软件扫描状态指标**  | 
| --- |
|  **指标**  |  **描述**  | 
|  `CompletedScanCount`  |  在给定时间范围内完成的 S3 对象恶意软件扫描次数。 有效维度：   `Malware Protection Plan Id` `Resource Name`   单位：计数  | 
|  `FailedScanCount`  |  在给定时间范围内失败的 S3 对象恶意软件扫描次数。 **有效维度**：   `Malware Protection Plan Id` `Resource Name`   单位：计数  | 
|  `SkippedScanCount`  |  在给定时间范围内跳过的 S3 对象恶意软件扫描次数。 **有效维度**：   `Malware Protection Plan Id` `Resource Name` `Skipped Reason`  可能的 值  `Unsupported`   `MissingPermissions`     单位：计数  | 
| **恶意软件扫描结果指标**  | 
| --- |
|  `InfectedScanCount`  |  在给定时间范围内检测到可能恶意对象的 S3 对象恶意软件扫描次数。 有效维度：   `Malware Protection Plan Id` `Resource Name`   单位：计数  | 
|  `CompletedScanBytes`  |  在给定时间范围内扫描的 S3 对象字节数。 有效维度：   `Malware Protection Plan Id` `Resource Name`   单位：计数  | 

**注意**  
默认情况下， CloudWatch 指标中的统计数据为 AVG。

S3 恶意软件防护指标支持以下维度。


| 
| 
| **维度** | **描述** | 
| --- |--- |
|  Malware Protection Plan Id  |  与为您的受保护资源 GuardDuty 创建的恶意软件防护计划资源关联的唯一标识符。  | 
|  Resource Name  |  受保护资源的名称。  | 
|  Skipped Reason  |  跳过 S3 对象恶意软件扫描的原因。  可能的 值  `Unsupported`   `MissingPermissions`    | 

有关访问和查询这些指标的信息，请参阅[亚马逊* CloudWatch 用户指南中的使用亚马逊 CloudWatch *指标](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)。

有关设置警报的信息，请参阅[亚马逊* CloudWatch 用户指南中的使用亚马逊 CloudWatch *警报](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)。