1

I want to use the boto3 to view my config rules.

> import boto3
> client = boto3.client('config')     
> client.describe_config_rules()

The previous snippet returns the rule information, but does not include the filed 'Description' for rules with a long description. I can see the whole description in the AWS console, but boto3 does not retrieve the description. Why is that? Can we control this behaviour?

The CLI command

$ aws configservice describe-config-rules

also does not return the description

Thank you for your help!

I can see the description in the console enter image description here

But describe_config_rules does not retrieve the description

response = client.describe_config_rules(
        ConfigRuleNames=[
            's3-bucket-logging-enabled-conformance-pack',
            ]
        )

'ConfigRules': [{'ConfigRuleArn': 'arn:aws:config:eu-central-1:xxxxxxxx:config-rule/aws-service-rule/config-conforms.amazonaws.com/config-rule',
                  'ConfigRuleId': 'config-rule-xxxx',
                  'ConfigRuleName': 's3-bucket-logging-enabled-conformance-pack',
                  'ConfigRuleState': 'ACTIVE',
                  'CreatedBy': 'config-conforms.amazonaws.com',
                  'Scope': {'ComplianceResourceTypes': ['AWS::S3::Bucket']},
                  'Source': {'Owner': 'AWS',
                             'SourceIdentifier': 'S3_BUCKET_LOGGING_ENABLED'}}],

...

anenriquez
  • 33
  • 4
  • Docs say it does return Description. Please provide an example of the output and screenshot from the console. maybe you are looking at different rules. – Marcin Mar 01 '22 at 07:27
  • The config rule is part of a conformance pack. For rules that are not part of a conformance pack I do get the 'Description'. I edited the question to include the screenshot from the console and the output of describe_config_rules. Thank you! – anenriquez Mar 02 '22 at 10:54

0 Answers0