From 8cc7331e75af6568777b41ce05bbcc1526a1bd11 Mon Sep 17 00:00:00 2001 From: cktricky Date: Wed, 25 Apr 2018 00:00:00 -0400 Subject: [PATCH] working thru this but still testing --- libs/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/config.py b/libs/config.py index 22356bc..b7d3de4 100644 --- a/libs/config.py +++ b/libs/config.py @@ -26,7 +26,7 @@ def describe_configuration_recorders(region): client = boto3.client("config", region_name=region) response = client.describe_configuration_recorders() - # print response + print(response) except botocore.exceptions.ClientError as e: if e.response['Error']['Code'] == 'InvalidClientTokenId': sys.exit("The AWS KEY IS INVALID. Exiting") @@ -54,7 +54,7 @@ def describe_configuration_rules(region): client = boto3.client("config", region_name=region) response = client.describe_config_rules() - # print response + print(response) except botocore.exceptions.ClientError as e: if e.response['Error']['Code'] == 'InvalidClientTokenId': sys.exit("The AWS KEY IS INVALID. Exiting") @@ -74,3 +74,6 @@ def describe_configuration_rules(region): print("CTRL-C received, exiting...") return response + +def list_all_config_rules(): + describe_configuration_rules('us-east-1')