You can use the AWS CLI to select the types of resources that you want AWS Config to record. You do this by creating a customer managed configuration recorder, which records the types of resources that you specify in a recording group. In the recording group, you specify whether you want to record all supported resource types, or to include or exclude specific types of resources.
Set up AWS Config to record configuration changes for all current and future supported resource types in this Region. For a list of supported resources types, see Supported Resource Types.
-
Use the
put-configuration-recorder
command:This command uses the
--configuration-recorder
and---recording-group
fields.$ aws configservice put-configuration-recorder \ --configuration-recorder
file://configurationRecorder.json
\ --recording-groupfile://recordingGroup.json
The
configuration-recorder
fieldThe
configurationRecorder.json
file specifiesname
androleArn
as well as the default recording frequency for the configuration recorder (recordingMode
).{ "name": "
default
", "roleARN": "arn:aws:iam::123456789012:role/config-role
", "recordingMode": { "recordingFrequency":CONTINUOUS
orDAILY
, "recordingModeOverrides": [ { "description": "Description you provide for the override
", "recordingFrequency":CONTINUOUS
orDAILY
, "resourceTypes": [Comma-separated list of resource types to include in the override
] } ] } }The
recording-group
fieldThe
recordingGroup.json
file specifies which resource types are recorded.{ "allSupported": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "includeGlobalResourceTypes": true }
For more information about these fields, see
put-configuration-recorder
in the AWS CLI Command Reference. -
(Optional) To verify that your customer managed configuration recorder has the settings that you want, use the following
describe-configuration-recorders
command.$ aws configservice describe-configuration-recorders
The following is an example response.
{ "ConfigurationRecorders": [ { "name": "default" "recordingGroup": { "allSupported": true, "exclusionByResourceTypes": { "resourceTypes": [] }, "includeGlobalResourceTypes": true, "recordingStrategy": { "useOnly": "ALL_SUPPORTED_RESOURCE_TYPES" }, "resourceTypes": [], }, "recordingMode": { "recordingFrequency":
CONTINUOUS
orDAILY
, "recordingModeOverrides": [ { "description": "Description you provide for the override
, "recordingFrequency":CONTINUOUS
orDAILY
, "resourceTypes": [Comma-separated list of resource types to include in the override
] } ] }, "roleARN": "arn:aws:iam::123456789012:role/config-role" } ] }