更改客户管理的配置记录器的记录频率 - Amazon Config
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

更改客户管理的配置记录器的记录频率

Amazon Config 支持连续记录和每日记录。

  • 连续记录可让您在每次发生配置更改时连续记录更改。

  • 使用每日记录,您将收到代表过去 24 小时内资源的最新状态的配置项(CI),前提是它与之前记录的 CI 不同。有关更多信息,请参阅记录频率

您可以使用 Amazon Config 控制台或 Amazon CLI 更改记录频率。

To change the recording frequency for the customer managed configuration recorder (Console)
  1. 登录到,Amazon Web Services 管理控制台然后通过以下网址打开 Amazon Config 控制台:https://console.aws.amazon.com/config/home

  2. 在导航窗格中,选择设置

  3. 客户管理的记录器选项卡上,选择开始记录

  4. 对于 Recording method managed recorder,请选择 All resource types with customizable overrides

  5. 默认设置中,选择记录频率。

  6. 选择保存

To change the recording frequency (CLI)

使用 put-configuration-recorder 命令更改配置记录器的记录频率:

$ aws configservice put-configuration-recorder \ --configuration-recorder file://configurationRecorder.json

configurationRecorder.json 文件指定配置记录器的 nameroleArn 以及默认记录频率(recordingMode)。您也可以使用此字段来覆盖特定资源类型的记录频率。

{ "name": "default", "roleARN": "arn:aws:iam::123456789012:role/config-role", "recordingMode": { "recordingFrequency": CONTINUOUS or DAILY, "recordingModeOverrides": [ { "description": "Description you provide for the override", "recordingFrequency": CONTINUOUS or DAILY, "resourceTypes": [ Comma-separated list of resource types to include in the override ] } ] } }

put-configuration-recorder 使用 --configuration-recorder 参数的以下字段:

  • name:配置记录器的名称。Amazon Config 创建配置记录器时会自动分配“default”名称。

  • roleARN:由 Amazon Config 代入并由配置记录器使用的 IAM 角色的 Amazon 资源名称(ARN)。

  • recordingMode:指定 Amazon Config 用于记录配置更改的默认记录频率。Amazon Config 支持“连续记录”和“每日记录”。连续记录可让您在每次发生配置更改时连续记录更改。使用每日记录,您将收到代表过去 24 小时内资源的最新状态的配置项(CI),前提是它与之前记录的 CI 不同。

    • recordingFrequency:Amazon Config 用于记录配置更改的默认录制频率。

      注意

      Amazon Firewall Manager 依赖连续记录来监控您的资源。如果您使用的是 Firewall Manager,建议您将记录频率设置为“持续”。

    • recordingModeOverrides – 此字段允许您为记录模式指定覆盖。它是一个 recordingModeOverride 对象数组。recordingModeOverrides 数组中的每个 recordingModeOverride 对象都由三个字段组成:

      • description – 您为覆盖提供的描述。

      • recordingFrequency – 将应用于覆盖中指定的所有资源类型的记录频率。

      • resourceTypes – 一个以逗号分隔的列表,用于指定 Amazon Config 在覆盖中包含哪些资源类型。

注意

必填字段和可选字段

put-configuration-recorderrecordingMode 字段是可选的。默认情况下,配置记录器的记录频率被设置为连续记录。

注意

限制

以下资源类型不支持每日记录:

  • AWS::Config::ResourceCompliance

  • AWS::Config::ConformancePackCompliance

  • AWS::Config::ConfigurationRecorder

对于记录所有当前和未来支持的资源类型ALL_SUPPORTED_RESOURCE_TYPES)记录策略,这些资源类型将设置为“连续记录”。