Skip to content

aws.config.describe_config_rules

Example SQL Queries

SELECT * FROM
aws.config.describe_config_rules;

Description

Returns details about your Config rules.

Table Definition

Column NameColumn Data Type
config_rule_names Input Column

The names of the Config rules for which you want details. If you do not specify any names, Config returns details for all your rules.

VARCHAR[]
Show child fields
config_rule_names[]
filters Input Column

Returns a list of Detective or Proactive Config rules. By default, this API returns an unfiltered list. For more information on Detective or Proactive Config rules, see Evaluation Mode in the Config Developer Guide.

STRUCT(
"evaluation_mode" VARCHAR
)
Show child fields
filters.evaluation_mode

The mode of an evaluation. The valid values are Detective or Proactive.

_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(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
config_rule_arn

The Amazon Resource Name (ARN) of the Config rule.

VARCHAR
config_rule_id

The ID of the Config rule.

VARCHAR
config_rule_name

The name that you assign to the Config rule. The name is required if you are adding a new rule.

VARCHAR
config_rule_state

Indicates whether the Config rule is active or is currently being deleted by Config. It can also indicate the evaluation status for the Config rule.

Config sets the state of the rule to EVALUATING temporarily after you use the StartConfigRulesEvaluation request to evaluate your resources against the Config rule.

Config sets the state of the rule to DELETING_RESULTS temporarily after you use the DeleteEvaluationResults request to delete the current evaluation results for the Config rule.

Config temporarily sets the state of a rule to DELETING after you use the DeleteConfigRule request to delete the rule. After Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.

VARCHAR
created_by

Service principal name of the service that created the rule.

The field is populated only if the service-linked rule is created by a service. The field is empty if you create your own rule.

VARCHAR
description

The description that you provide for the Config rule.

VARCHAR
evaluation_modes

The modes the Config rule can be evaluated in. The valid values are distinct objects. By default, the value is Detective evaluation mode only.

STRUCT(
"mode" VARCHAR
)[]
Show child fields
evaluation_modes[]
Show child fields
evaluation_modes[].mode

The mode of an evaluation. The valid values are Detective or Proactive.

input_parameters

A string, in JSON format, that is passed to the Config rule Lambda function.

VARCHAR
maximum_execution_frequency

The maximum frequency with which Config runs evaluations for a rule. You can specify a value for MaximumExecutionFrequency when:

  • This is for an Config managed rule that is triggered at a periodic frequency.

  • Your custom rule is triggered when Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties.

By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the MaximumExecutionFrequency parameter.

VARCHAR
scope

Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.

The scope can be empty.

STRUCT(
"compliance_resource_types" VARCHAR[],
"tag_key" VARCHAR,
"tag_value" VARCHAR,
"compliance_resource_id" VARCHAR
)
Show child fields
scope.compliance_resource_id

The ID of the only Amazon Web Services resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for ComplianceResourceTypes.

scope.compliance_resource_types[]
scope.tag_key

The tag key that is applied to only those Amazon Web Services resources that you want to trigger an evaluation for the rule.

scope.tag_value

The tag value applied to only those Amazon Web Services resources that you want to trigger an evaluation for the rule. If you specify a value for TagValue, you must also specify a value for TagKey.

source

Provides the rule owner (Amazon Web Services for managed rules, CUSTOM_POLICY for Custom Policy rules, and CUSTOM_LAMBDA for Custom Lambda rules), the rule identifier, and the notifications that cause the function to evaluate your Amazon Web Services resources.

STRUCT(
"owner" VARCHAR,
"source_identifier" VARCHAR,
"source_details" STRUCT(
"event_source" VARCHAR,
"message_type" VARCHAR,
"maximum_execution_frequency" VARCHAR
)[],
"custom_policy_details" STRUCT(
"policy_runtime" VARCHAR,
"policy_text" VARCHAR,
"enable_debug_log_delivery" BOOLEAN
)
)
Show child fields
source.custom_policy_details

Provides the runtime system, policy definition, and whether debug logging is enabled. Required when owner is set to CUSTOM_POLICY.

Show child fields
source.custom_policy_details.enable_debug_log_delivery

The boolean expression for enabling debug logging for your Config Custom Policy rule. The default value is false.

source.custom_policy_details.policy_runtime

The runtime system for your Config Custom Policy rule. Guard is a policy-as-code language that allows you to write policies that are enforced by Config Custom Policy rules. For more information about Guard, see the Guard GitHub Repository.

source.custom_policy_details.policy_text

The policy definition containing the logic for your Config Custom Policy rule.

source.owner

Indicates whether Amazon Web Services or the customer owns and manages the Config rule.

Config Managed Rules are predefined rules owned by Amazon Web Services. For more information, see Config Managed Rules in the Config developer guide.

Config Custom Rules are rules that you can develop either with Guard (CUSTOM_POLICY) or Lambda (CUSTOM_LAMBDA). For more information, see Config Custom Rules in the Config developer guide.

source.source_details[]
Show child fields
source.source_details[].event_source

The source of the event, such as an Amazon Web Services service, that triggers Config to evaluate your Amazon Web Services resources.

source.source_details[].maximum_execution_frequency

The frequency at which you want Config to run evaluations for a custom rule with a periodic trigger. If you specify a value for MaximumExecutionFrequency, then MessageType must use the ScheduledNotification value.

By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the MaximumExecutionFrequency parameter.

Based on the valid value you choose, Config runs evaluations once for each valid value. For example, if you choose Three_Hours, Config runs evaluations once every three hours. In this case, Three_Hours is the frequency of this rule.

source.source_details[].message_type

The type of notification that triggers Config to run an evaluation for a rule. You can specify the following notification types:

  • ConfigurationItemChangeNotification - Triggers an evaluation when Config delivers a configuration item as a result of a resource change.

  • OversizedConfigurationItemChangeNotification - Triggers an evaluation when Config delivers an oversized configuration item. Config may generate this notification type when a resource changes and the notification exceeds the maximum size allowed by Amazon SNS.

  • ScheduledNotification - Triggers a periodic evaluation at the frequency specified for MaximumExecutionFrequency.

  • ConfigurationSnapshotDeliveryCompleted - Triggers a periodic evaluation when Config delivers a configuration snapshot.

If you want your custom rule to be triggered by configuration changes, specify two SourceDetail objects, one for ConfigurationItemChangeNotification and one for OversizedConfigurationItemChangeNotification.

source.source_identifier

For Config Managed rules, a predefined identifier from a list. For example, IAM_PASSWORD_POLICY is a managed rule. To reference a managed rule, see List of Config Managed Rules.

For Config Custom Lambda rules, the identifier is the Amazon Resource Name (ARN) of the rule's Lambda function, such as arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name.

For Config Custom Policy rules, this field will be ignored.