> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-waf-rule-group-cloudwatch-metrics-disabled.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS WAF Rule Group CloudWatch metrics disabled

### Synopsis

| Field               | Value                                          |
| ------------------- | ---------------------------------------------- |
| Rule Type           | Detection                                      |
| Finding Type        | AWS WAF Rule Group CloudWatch metrics disabled |
| Finding ID          | 60000915                                       |
| Generates a Finding | This detection rule also generates a finding   |
| Severity            | Informational                                  |
| Category            | CONFIGURATION                                  |
| Cloud Providers     | AWS                                            |
| Platform Module     | CSPM                                           |
| Asset Types         | AWS\_WAF\_V2\_RULE\_GROUP                      |

### Description

AWS WAF Rule Groups lacking enabled CloudWatch metrics present a significant security risk. Disabling these metrics hinders monitoring and analysis of web requests processed by the WAF.

AWS WAF leverages CloudWatch metrics to track allowed and blocked requests, providing crucial insights into web ACL performance. Without these metrics, identifying suspicious activity, analyzing attack patterns, and effectively responding to security incidents becomes significantly more challenging. Attackers could exploit this lack of visibility to evade detection and compromise systems.

The inability to monitor WAF activity due to disabled CloudWatch metrics leaves organizations blind to potential breaches and compromises. Real-time insights into request volume and blocked requests are essential for proactive security and incident response. Enabling CloudWatch metrics allows for immediate identification of anomalies and facilitates timely remediation.

To mitigate this misconfiguration, ensure CloudWatch metrics are enabled for all AWS WAF Rule Groups. Regularly review and analyze the generated metrics to identify trends and potential threats.

### Remediation

To enable RuleGroup with CloudWatch metrics please follow below steps:

1. Run the below command to get the ruleGroup details to be used for update

   ```
       aws wafv2 list-rule-groups --scope {entity}
   ```
2. Get the ruleGroup 'Id' and 'LockToken' values for the ruleGroup to be updated from the output.
3. Run the below command with name and 'Id' obtained from above output

   ```
        aws wafv2 get-rule-group --name {entity} --scope {entity} --id {entity}
   ```
4. Get the 'Rules' block output and save it in a file for further reference from above command output
5. Please update 'CloudWatchMetricsEnabled' field to true for every rule in the file saved from above along with providing a metric name at the 'MetricName' field
6. Run the below command to enable CloudWatch metrics on the ruleGroup.

   ```
         aws wafv2 update-rule-group \n --name {entity} \n --scope {entity} \n --id {entity} \n --lock-token {entity} \n --rules file://{entity}
          --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=
             {metricNameForRuleGroup)
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-waf-rule-group-cloudwatch-metrics-disabled.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
