Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ct_configrecorder_override_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ def assume_role(account_id, role='AWSControlTowerExecution'):
'includeGlobalResourceTypes': home_region
}
})
logging.info(f'Response for put_configuration_recorder :{response} ')

logging.warning(
f"Configuration Recorder reset to default. Response: {json.dumps(response, default=str)}"
)
else:
if CONFIG_RECORDER_STRATEGY == 'EXCLUSION':
# Original exclusion-based code - EXACTLY as in the working version
Expand Down
6 changes: 3 additions & 3 deletions ct_configrecorder_override_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def lambda_handler(event, context):
elif ('LogicalResourceId' in event) and (event['RequestType'] == 'Update'):
logging.info('Update Update')
logging.info(
'overriding config recorder for ALL accounts because of first run after function deployment from CloudFormation')
'overriding config recorder for ALL accounts because of overriding config recorder for ALL accounts because of CloudFormation stack update')
override_config_recorder(excluded_accounts, sqs_url, '', 'Update')
response = {}
update_excluded_accounts(excluded_accounts,sqs_url)
Expand All @@ -83,8 +83,8 @@ def lambda_handler(event, context):
cfnresponse.send(event, context, cfnresponse.SUCCESS, response, "CustomResourcePhysicalID")
elif ('LogicalResourceId' in event) and (event['RequestType'] == 'Delete'):
logging.info('DELETE DELETE')
logging.info(
'overriding config recorder for ALL accounts because of first run after function deployment from CloudFormation')
logging.warning(
'Initiating config recorder cleanup for ALL accounts due to CloudFormation stack deletion')
override_config_recorder(excluded_accounts, sqs_url, '', 'Delete')
response = {}
## Send signal back to CloudFormation after the final run
Expand Down