cloudwatch_top_ips
Rank top client IPs in CloudWatch WAF/ALB log groups by total, allowed, and blocked counts to identify abusive IPs before banning them.
Instructions
Rank the top client IPs in a CloudWatch log group. Parses WAF/ALB structured logs to report per-IP total, allowed, and blocked counts — use it to find abusive IPs before banning.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"log_group": "<log_group>"
},
"name": "cloudwatch_top_ips"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum IPs to return. | |
| region | No | AWS region (optional). | |
| account | No | AWS account label to act in; omit for the default account. | |
| log_group | Yes | CloudWatch log group name (e.g. a WAF or ALB access-log group). | |
| hours_back | No | How many hours back to scan. | |
| max_events | No | Maximum events to scan (0 = unlimited, capped at 50000). | |
| action_filter | No | Count only events with this WAF action: 'ALLOW', 'BLOCK', or empty for all. |