# AWS WAF Rules & Rate Limiting Calculator AI Agent Connect

> Calculate AWS WAF capacity, rate limits, and rule complexity against best practices.

## Overview
- **Category:** security
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_N972MUC7PW5DZ5OYn4kUFYngYKQ5SGX1JPxuoSPd/ai-agent-connect
- **Tags:** waf, aws, security, cloud, compliance

## Description

This MCP server provides deterministic calculations for AWS WAF (Web Application Firewall) configurations. It helps architects and security engineers validate their rule sets against AWS recommended limits and mandatory constraints. Use `calculate_waf_capacity` to determine total rule counts across Web ACLs and rule groups, `analyze_rate_limiting` to verify rate-based rule thresholds, and `evaluate_rule_complexity` to ensure nesting depth and condition counts stay within safe operational bounds.

## Tools

### analyze_rate_limiting
Evaluates rate-based rule configurations against AWS minimum requirements and constraints

### calculate_waf_capacity
Calculates the total rule and resource capacity based on the number of Web ACLs and rule groups provided

### evaluate_rule_complexity
Checks if the logical structure of rules adheres to nesting and condition limits

## Prompt Examples

**Prompt:** 
```
Calculate capacity for 5 Web ACLs with 50 rules each, and 10 rule groups with 20 rules each.
```

**Response:** 
```
Total Web ACLs: 5. Total rules in ACLs: 250. Total rule groups: 10. Total rules in groups: 200.
```

**Prompt:** 
```
Is a rate threshold of 50 requests per 5 minutes valid?
```

**Response:** 
```
No, the threshold is invalid because it is below the minimum requirement of 100 requests.
```

**Prompt:** 
```
Check complexity for a rule with 6 levels of nesting and 12 conditions.
```

**Response:** 
```
The configuration is invalid. It violates the nesting limit (max 5) and exceeds the recommended condition limit (max 10).
```

## Frequently Asked Questions

**How do I check if my WAF rule count is too high?**
You can use the `calculate_waf_capacity` tool. It will return a list of capacity warnings if your planned number of rules or Web ACLs exceeds the recommended limits.

**What is the minimum threshold for rate-based rules?**
The minimum allowed threshold for rate-based rules in AWS WAF is 100 requests per 5-minute window. The `analyze_rate_limiting` tool will flag any value below this.

**Can I use this to check rule nesting depth?**
Yes, the `evaluate_rule_complexity` tool specifically checks if your nesting depth exceeds the recommended limit of 5 levels.
