817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0
2.3 KB Raw Blame API Reference: Securing API Gateway with AWS WAF
boto3 WAFv2 Client
Installation
pip install boto3
Client Initialization
client = boto3.client("wafv2", region_name="us-east-1")
Key Methods
| Method |
Description |
create_web_acl() |
Create a new Web ACL with rules and default action |
update_web_acl() |
Modify rules, requires LockToken for optimistic concurrency |
get_web_acl() |
Retrieve full Web ACL configuration and lock token |
list_web_acls() |
List all Web ACLs in a scope (REGIONAL or CLOUDFRONT) |
associate_web_acl() |
Attach Web ACL to API Gateway, ALB, or AppSync |
get_sampled_requests() |
Retrieve sampled requests for a specific rule metric |
get_rate_based_statement_managed_keys() |
Get IPs currently rate-limited |
put_logging_configuration() |
Configure WAF logging to Firehose/S3 |
list_resources_for_web_acl() |
List resources associated with a Web ACL |
Managed Rule Groups
| Rule Group |
Protection |
AWSManagedRulesCommonRuleSet |
OWASP Top 10 common attacks |
AWSManagedRulesSQLiRuleSet |
SQL injection patterns |
AWSManagedRulesKnownBadInputsRuleSet |
Known bad request patterns |
AWSManagedRulesAmazonIpReputationList |
Malicious IP blocking |
AWSManagedRulesBotControlRuleSet |
Bot detection and management |
Rate-Based Rule Parameters
| Parameter |
Type |
Description |
Limit |
int |
Max requests per 5-minute window (min: 100) |
AggregateKeyType |
str |
IP or FORWARDED_IP |
ScopeDownStatement |
dict |
Optional filter to scope rate limiting |
CloudWatch Metrics (Namespace: AWS/WAFV2)
| Metric |
Description |
AllowedRequests |
Requests allowed by WAF |
BlockedRequests |
Requests blocked by WAF |
CountedRequests |
Requests matched in Count mode |
PassedRequests |
Requests not matching any rule |
References