验证 Amazon Config 是否已成功启动 Amazon CLI - Amazon Config
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

验证 Amazon Config 是否已成功启动 Amazon CLI

启动后 Amazon Config,您可以使用 Amazon CLI 命令检查是否 Amazon Config 正在运行以及是否 Amazon Config 已创建配置记录器和传送渠道。您也可以确认 Amazon Config 已开始录制配置并将其传送到交付渠道。

步骤 1:检查配送渠道是否已创建

使用 describe-delivery-channels 命令检查是否已配置 Amazon S3 存储桶和 Amazon SNS 主题。

您可以使用该--delivery-channel-names字段指定配送渠道列表。如果未指定传递渠道,则此命令将返回与该账户关联的所有交付渠道的详细信息。

$ aws configservice describe-delivery-channels { "DeliveryChannels": [ { "snsTopicARN": "arn:aws:sns:us-west-2:0123456789012:my-config-topic", "name": "my-delivery-channel", "s3BucketName": "my-config-bucket" } ] }

步骤 2:检查配置记录器是否已创建

使用describe-configuration-recorders命令检查配置记录器是否已创建。

您可以使用arnconfiguration-recorder-names字段来指定配置记录器列表。如果未指定配置记录器,则此命令将返回与该账户关联的所有配置记录器的详细信息。

$ aws configservice describe-configuration-recorders { "ConfigurationRecorders": [ { "roleARN": "arn:aws:iam::012345678912:role/myConfigRole", "name": "default" } ] }

第 3 步:检查是否 Amazon Config 已开始录制

使用describe-configuration-recorder-status命令检查配置记录器是否成功记录了范围内的资源类型。

您可以使用arnconfiguration-recorder-names字段来指定配置记录器列表。如果未指定配置记录器,则此命令将返回与该账户关联的所有配置记录器的详细信息。

$ aws configservice describe-configuration-recorder-status { "ConfigurationRecordersStatus": [ { "name": "default", "lastStatus": "SUCCESS", "lastStopTime": 1414511624.914, "lastStartTime": 1414708460.276, "recording": true, "lastStatusChangeTime": 1414816537.148, "lastErrorMessage": "NA", "lastErrorCode": "400" } ] }

recording字段中的true值确认配置记录器已开始记录配置。 Amazon Config 以 UTC 记录时间。输出显示为 Unix 时间戳。