Skip to main content

Triage and Remediation

Remediation

Using Console

Here are the step-by-step instructions to remediate the AWS Config Should Be Enabled misconfiguration using the AWS console:
  1. Log in to the AWS Management Console.
  2. Navigate to the AWS Config service.
  3. Click on the “Get started” button to begin setting up AWS Config.
  4. On the “AWS Config” page, select the region you want to enable AWS Config in.
  5. Choose the resource types that you want AWS Config to monitor for changes.
  6. For “Amazon S3 bucket for AWS Config snapshots”, choose an S3 bucket to store configuration snapshots.
  7. For “Amazon SNS topic for AWS Config notifications”, select an SNS topic to receive notifications.
  8. Click on the “Next” button to proceed to the “Rules” page.
  9. On the “Rules” page, select the rules that you want AWS Config to evaluate.
  10. Click on the “Next” button to proceed to the “Review” page.
  11. Review the settings and click on the “Confirm” button to enable AWS Config.
  12. Wait for AWS Config to finish setting up and start monitoring your resources.
Once AWS Config is enabled, it will continuously monitor your resources and notify you of any configuration changes or violations.

To remediate the misconfiguration “AWS Config Should Be Enabled” for AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local machine or terminal.
  2. Run the following command to enable AWS Config:
Note: Make sure to replace rule.json with the name of the JSON file that contains the configuration rule. You can create a new JSON file with the following contents:
  1. After running the command, AWS Config will be enabled in your AWS account. You can verify this by going to the AWS Config console and checking the status.
Note: It may take a few minutes for the configuration changes to take effect.
  1. You can also use the following command to check the status of AWS Config:
This command will show you the status of the configuration recorders for AWS Config.
  1. Once you have verified that AWS Config is enabled, you can close the AWS CLI.
Congratulations! You have successfully remediated the misconfiguration “AWS Config Should Be Enabled” for AWS using AWS CLI.
To remediate the misconfiguration “AWS Config Should Be Enabled” for AWS using python, follow these steps:
  1. Import the boto3 library to interact with AWS services using Python.
  1. Create a boto3 client for AWS Config.
  1. Check if AWS Config is enabled. If it is not enabled, enable it using the put_config_rule method.
  1. Set the delivery channel for AWS Config. This will specify where the AWS Config data will be delivered.
  1. Confirm that AWS Config is enabled.
Note: Replace 123456789012 with your AWS account number and myconfigbucket with the name of your S3 bucket where you want to store the AWS Config data.
This enables AWS Config in the target region, recording all supported resources (including Route53 as a global resource), writing to the specified S3 bucket with the same permissions and behavior as the provided CLI remediation. No resource here is forced to be replaced unless you already manage any of these with different names in Terraform.To verify, terraform plan should show:
  • creation of aws_s3_bucket.config_bucket and aws_s3_bucket_policy.config_bucket
  • creation of aws_iam_role.config_role and its aws_iam_role_policy_attachment
  • creation (or in-place update, if they already exist with the same names) of aws_config_configuration_recorder.default, aws_config_delivery_channel.default, and aws_config_configuration_recorder_status.default, with all_supported = true and include_global_resource_types = true.