Skip to main content

WAF (Web Application Firewall)

Quick Reference

# List WebACLs
aws wafv2 list-web-acls --scope REGIONAL --query 'WebACLs[].[Name,Id]' --output table

# Get WebACL details
aws wafv2 get-web-acl --name staging-MonolithWebACL --scope REGIONAL --id {id}

# Get sampled requests (recent blocked/allowed)
aws wafv2 get-sampled-requests --web-acl-arn {arn} --rule-metric-name IPRateLimitRule \
--scope REGIONAL --time-window StartTime=$(date -v-1H +%s),EndTime=$(date +%s) --max-items 10

WebACLs

Both the Console API Gateway and the Controller ALB have WAF WebACLs attached.

Rules (Priority Order)

PriorityRuleTypeActionThreshold
0IPRateLimitRuleRate-basedBlock (429)2000 req/5min per IP
1APIKeyRateLimitRuleRate-basedBlock (429)2000 req/5min per X-API-Key
2AWSManagedRulesBotControlRuleSetManagedMonitorBot detection (HttpLibrary, SocialMedia, Monitoring allowed)
3-7AWS Managed RulesManagedMonitorLinux, KnownBadInputs, Common, Unix, SQLi

What to Look For

SymptomCheck
Legitimate traffic blockedCheck sampled requests for the rate limit rules
Bot traffic spikeCheck BotControl rule metrics in CloudWatch
Attack patternsCheck KnownBadInputs and SQLi rule match counts