This rule ensures the presence of a log metric filter and alarm for AWS Config configuration modifications.
Rule | Ensure a log metric filter and alarm exist for AWS Config configuration changes |
Framework | cis_v140 |
Severity | ✔ Low |
Rule Description:
The rule ensures the presence of a log metric filter and alarm for AWS Config configuration changes that comply with the CIS AWS Foundations Benchmark (version 1.4.0).
Troubleshooting Steps:
If the log metric filter and alarm for AWS Config configuration changes do not exist, you can follow these troubleshooting steps:
Verify Rule Evaluation: Ensure the AWS Config rule evaluation is running and the rule for cis_v140 is enabled. Use the AWS Config console or AWS CLI to check the rule status.
Check CloudTrail Configuration: Verify that AWS CloudTrail is enabled and properly configured. Ensure that logging is turned on and the trail is capturing Config events.
Check IAM Permissions: Confirm that the IAM role used by AWS Config has the necessary permissions to access CloudTrail and publish CloudWatch metrics. Ensure that the
AWSConfigRulesExecutionRole
has the required policies attached.Review AWS Config AWS Logging: Inspect the AWS Config settings to ensure that the AWS logging option is enabled. This allows AWS Config to log to CloudWatch logs.
Confirm Log Metric Filter Configuration: Verify that the log metric filter for AWS Config configuration changes is properly configured. Ensure that the required filter pattern is present and captures the necessary log events.
Validate CloudWatch Alarm Configuration: Double-check the CloudWatch alarm configuration associated with the log metric filter. Make sure the alarm is set up to trigger based on the expected criteria and that the actions taken upon triggering are appropriate.
Necessary Codes:
No specific code is required for this rule.
Remediation Steps:
To create a log metric filter and alarm for AWS Config configuration changes for cis_v140, perform the following steps:
Create Log Metric Filter:
{ ($.eventName = "Put*") && ($.eventSource = "config.amazonaws.com") && (($.additionalEventData.managedRuleIdentifier = "cis_v1.4.0_RuleID") || ($.additionalEventData.managedRuleIdentifier = "cis_v140"))) }
Create CloudWatch Alarm:
Verify Functionality:
By following these remediation steps, you will ensure the presence of a log metric filter and alarm that monitors AWS Config configuration changes for cis_v140, helping you maintain compliance with the CIS AWS Foundations Benchmark.