aws.config.get_resource_config_history
Example SQL Queries
SELECT * FROMaws.config.get_resource_config_historyWHERE"resource_type" = 'VALUE'AND "resource_id" = 'VALUE';Description
For accurate reporting on the compliance status, you must record the AWS::Config::ResourceCompliance resource type. For more information, see Selecting Which Resources Config Records.
Returns a list of ConfigurationItems for the specified resource. The list contains details about each state of the resource during the specified time interval. If you specified a retention period to retain your ConfigurationItems between a minimum of 30 days and a maximum of 7 years (2557 days), Config returns the ConfigurationItems for the specified retention period.
The response is paginated. By default, Config returns a limit of 10 configuration items per page. You can customize this number with the limit parameter. The response includes a nextToken string. To get the next page of results, run the request again and specify the string for the nextToken parameter.
Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified limit. In such cases, you can make another call, using the nextToken.
Table Definition
| Column Name | Column Data Type |
|---|---|
| resource_id Required Input Column The ID of the resource (for example, sg-xxxxxx). | VARCHAR |
| resource_type Required Input Column The type of Amazon Web Services resource. | VARCHAR |
| chronological_order Input Column The chronological order for configuration items listed. By default, the results are listed in reverse chronological order. | VARCHAR |
| earlier_time Input Column The chronologically earliest time in the time range for which the history requested. If not specified, the action returns paginated results that contain configuration items that start when the first configuration item was recorded. | TIMESTAMP_S |
| later_time Input Column The chronologically latest time in the time range for which the history requested. If not specified, current time is taken. | TIMESTAMP_S |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| account_id The 12-digit Amazon Web Services account ID associated with the resource. | VARCHAR |
| arn Amazon Resource Name (ARN) associated with the resource. | VARCHAR |
| availability_zone The Availability Zone associated with the resource. | VARCHAR |
| aws_region The region where the resource resides. | VARCHAR |
| configuration The description of the resource configuration. | VARCHAR |
| configuration_item_capture_time The time when the recording of configuration changes was initiated for the resource. | TIMESTAMP_S |
| configuration_item_delivery_time The time when configuration changes for the resource were delivered. This field is optional and is not guaranteed to be present in a configuration item (CI). If you are using daily recording, this field will be populated. However, if you are using continuous recording, this field will be omitted since the delivery time is instantaneous as the CI is available right away. For more information on daily recording and continuous recording, see Recording Frequency in the Config Developer Guide. | TIMESTAMP_S |
| configuration_item_md5_hash Unique MD5 hash that represents the configuration item's state. You can use MD5 hash to compare the states of two or more configuration items that are associated with the same resource. | VARCHAR |
| configuration_item_status The configuration item status. Valid values include:
| VARCHAR |
| configuration_state_id An identifier that indicates the ordering of the configuration items of a resource. | VARCHAR |
| recording_frequency The recording frequency that Config uses to record configuration changes for the resource. | VARCHAR |
| related_events A list of CloudTrail event IDs. A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail log. For more information about CloudTrail, see What Is CloudTrail. An empty field indicates that the current configuration was not initiated by any event. As of Version 1.3, the relatedEvents field is empty. You can access the LookupEvents API in the CloudTrail API Reference to retrieve the events for the resource. | VARCHAR[] |
Show child fields
| |
| relationships A list of related Amazon Web Services resources. | STRUCT( |
Show child fields
| |
| resource_creation_time The time stamp when the resource was created. | TIMESTAMP_S |
| resource_name The custom name of the resource, if available. | VARCHAR |
| supplementary_configuration Configuration attributes that Config returns for certain resource types to supplement the information returned for the configuration parameter. | MAP(VARCHAR, VARCHAR) |
| tags A mapping of key value tags associated with the resource. | MAP(VARCHAR, VARCHAR) |
| version The version number of the resource configuration. | VARCHAR |