Documentation Index
Fetch the complete documentation index at: https://cloudanix.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
More Info:
Ensure that AWS Config service is enabled in all regions in order to have complete visibility over your AWS infrastructure configuration changes.
Risk Level
High
Address
Security
Compliance Standards
CBP
Using Console:
- Steps:
- Log in to the AWS Management Console.
- Navigate to the AWS Config service.
- Check if there are any Configuration Recorders configured.
- If there are no Configuration Recorders, create a new one by clicking on “Create Configuration Recorder” and follow the setup wizard.
- If there are Configuration Recorders:
- Review each Configuration Recorder.
- Ensure that the “Include global resources” option is enabled.
- Edit the Configuration Recorder if necessary to enable global resource recording.
Using CLI:
- Commands:
aws configservice put-configuration-recorder --configuration-recorder name=default --recording-group allSupported=true
- Steps:
- Use the above CLI command to update the Configuration Recorder to include global resource recording.
- Replace
name=default with the name of your Configuration Recorder.
Using Python
- Logic:
import boto3
def enable_global_resource_recording():
try:
config = boto3.client('config')
# Check if Configuration Recorders exist
recorders = config.describe_configuration_recorders()['ConfigurationRecorders']
if not recorders:
# Create a new Configuration Recorder
config.put_configuration_recorder(ConfigurationRecorder={
'name': 'default',
'recordingGroup': {'allSupported': True}
})
print("Configuration Recorder created with global resource recording enabled.")
else:
for recorder in recorders:
if not recorder.get('recordingGroup', {}).get('allSupported', False):
# Update existing Configuration Recorder to enable global resource recording
config.put_configuration_recorder(ConfigurationRecorder={
'name': recorder['name'],
'recordingGroup': {'allSupported': True}
})
print(f"Global resource recording enabled for Configuration Recorder: {recorder['name']}")
break
else:
print("Global resource recording is already enabled for all Configuration Recorders.")
except Exception as e:
print(f"Error: {e}")
# Execute remediation
enable_global_resource_recording()
Ensure that you have the necessary permissions to update AWS Config settings using the AWS CLI or Python script. Also, review and test the changes before applying them to production environments.
Additional Reading: