waf
Configures AWS WAF to filter web traffic: creating web access control lists (web ACLs) on CloudFront, Application Load Balancers, API Gateway, and AppSync; AWS Managed Rules tuned in Count mode; rate-based rules for HTTP floods; IP set and geographic match rules; Bot Control (Common and Targeted); t
- 0
- Installs
- —
- Rating
- —
- Success rate
- 14
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 7d1fea09726a2023… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
AWS WAF
Overview
Domain expertise for configuring AWS WAF, the web application firewall that filters HTTP and HTTPS traffic to CloudFront distributions, Application Load Balancers, API Gateway REST APIs, and AppSync GraphQL APIs. Covers web ACL creation and association, AWS Managed Rules, rate-based rules, match rules (IP set and geographic), Bot Control and the signal-forwarding workflows built on top of it, Fraud Control for logins and signups, AI and LLM crawler management, and the logging that every tuning workflow depends on.
This skill is a router. Each customer task maps to a procedure file under references/. Read the
matching reference in full before acting, then follow its constraints and steps. The reference
files are self-contained: each carries its own decision tables, constraints, procedure, and
troubleshooting.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. A web ACL's scope is fixed at creation: a
CloudFront web ACL must be created in us-east-1 with CLOUDFRONT scope, while a regional web ACL
(Application Load Balancer, API Gateway, AppSync) is created in the resource's Region with
REGIONAL scope.
Which WAF task do you need?
Routing notes
- Logging comes before tuning. Every Count-mode tuning workflow assumes logging and request sampling are on. If the customer has not set up logging, run that reference first; otherwise Count-mode tuning has nothing to read.
- Web ACL scope is fixed at creation. A CloudFront web ACL is
CLOUDFRONTscope inus-east-1; a regional resource needs aREGIONALweb ACL in its own Region. Scope cannot be changed later, so the creating reference settles it before anything is built. - Bot Control is a chain, not one task. Protecting against bots is the on-ramp (turn on, choose Common vs Targeted, observe). Turning labels into a confidence signal, forwarding that signal, and deciding what the application does with it are three separate references that build on it in that order. The header-stripping reference is the mandatory safety companion whenever a signal is forwarded to the origin.
- Common vs Targeted is not a soft choice. Common only catches self-identifying bots and known-bad IPs. For login, checkout, or any high-value endpoint facing evasive bots, Targeted with the application integration SDK is required. The bots reference pushes Targeted for real bot threats rather than presenting it as optional.
- Rate limiting vs Fraud Control. Rate-based rules blunt volumetric HTTP floods. Credential stuffing and fake-account creation are account-based abuse that rate limiting misses; those go to the Fraud Control reference (ATP and ACFP), not the rate-based reference.
- Forwarded headers need the strip rule. Any time the customer forwards a signal or the client
IP to the origin in
x-amzn-waf-*headers, the inbound-header-stripping reference is required to prevent spoofing. The confidence-signal, interpolation, and client-IP references all point at it. - What lives in other skills. L3/L4 DDoS protection and Shield cost-protection credits are the shieldadvanced skill. Multi-account WAF rollout is the firewallmanager skill. CloudFront and Application Load Balancer configuration are their own skills. This skill builds the WAF rules; it does not configure the resources it protects.
Security Considerations
AWS WAF is itself a security control, so misconfiguration directly weakens an application's defenses. Apply these across every reference:
- Least-privilege IAM. You MUST grant only the specific
wafv2:actions a task needs (for examplewafv2:CreateWebACL,wafv2:GetWebACL,wafv2:UpdateWebACL,wafv2:AssociateWebACL,wafv2:PutLoggingConfiguration) rather thanwafv2:*or theAWSWAFFullAccessmanaged policy. - Ephemeral credentials. You MUST use IAM roles with temporary credentials (such as an EC2
instance profile, SSO session, or
aws sts assume-role) rather than long-lived IAM user access keys when running these WAF CLI commands. - Monitor configuration changes. You SHOULD enable AWS CloudTrail on
wafv2management events and set CloudWatch alarms on critical web ACL configuration changes (such asDeleteWebACLandUpdateWebACLrule removals) and on the web ACL'sBlockedRequestsandCountedRequestsmetrics, so rule changes and sudden spikes in blocked or counted traffic are detected. - Misconfiguration opens access. A web ACL that is created but never associated, or one whose
default action is left at
Allowwith no enforcing rules, filters nothing. You MUST confirm the web ACL is associated and that its posture matches the intended default (block vs allow) before reporting setup complete. - Protect log destinations. Logs can capture credentials and session data. You MUST redact
sensitive fields (such as the
authorizationheader andcookie) and MUST enable encryption at rest on the log destination (CloudWatch Logs, Amazon S3, or Amazon Data Firehose). - Header-spoofing risk. Any
x-amzn-waf-*signal forwarded to the origin can be forged inbound. You MUST add the inbound-header-stripping rule whenever a signal or client IP is forwarded (see stripping-inbound-waf-headers-before-trusting-them).
Additional Resources
Files
14- SKILL.md
c1bf535cf48.6 KB - references/adaptive-mitigation-playbook-for-forwarded-signals.md
1bd83c690d8.9 KB - references/adding-managed-rules-and-tuning-with-count-mode.md
1c456e471e10.1 KB - references/adding-rate-based-rules.md
751efab9d710.5 KB - references/creating-a-web-acl-and-associating-it-with-a-resource.md
a4a287dbe89.3 KB - references/forwarding-signals-with-dynamic-label-interpolation.md
9194f29d459.5 KB - references/protecting-against-bots-with-bot-control.md
da89e935349.9 KB - references/protecting-logins-and-signups-with-fraud-control.md
b15c80ee289.2 KB - references/recovering-the-real-client-ip-behind-a-cdn.md
788c4061fb9.4 KB - references/seeing-and-managing-ai-crawler-traffic.md
26fb5b66817.3 KB - references/setting-up-logging-and-request-sampling.md
ad93a88b889.2 KB - references/stripping-inbound-waf-headers-before-trusting-them.md
f68b0ced5b7.5 KB - references/turning-bot-control-labels-into-a-confidence-signal.md
d85a8d046f11.0 KB - references/using-ip-sets-and-geographic-match-rules.md
a3334580288.5 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from aws/agent-toolkit-for-aws8
Amazon Aurora MySQL — creates, modifies, and advises on Aurora MySQL clusters specifically (MySQL-compatible engine, Aurora serverless, parallel query). Trigger for Aurora MySQL cluster operations, ACU sizing, I/O-Optimized storage, commitment pricing, or MySQL upgrade planning. Aurora MySQL uses fu
Amazon Aurora PostgreSQL — creates, modifies, and advises on Aurora PostgreSQL clusters specifically (PostgreSQL-compatible engine, Aurora serverless, express configuration, pgvector, Babelfish). Trigger for Aurora PostgreSQL cluster operations, express-configuration quick-start, ACU sizing, I/O-Opt
Builds generative AI applications on Amazon Bedrock. Covers model invocation (Converse API, InvokeModel), RAG with Knowledge Bases, Bedrock Agents, Guardrails, and AgentCore (including the Harness managed agent loop). Applies when invoking models, setting up Knowledge Bases, creating agents, applyin
Runs quantum computing workflows on AWS through Amazon Braket — discovering devices (QPUs and simulators) and their availability, building gate-model circuits and analog Hamiltonian programs, submitting quantum tasks, program sets and hybrid jobs, looking up prices, and capping spend with spending l
Manages Amazon DocumentDB end-to-end — serverless-on-8.0 cluster setup, TLS/VPC/driver config, flexible-schema and vector-search data modeling, MongoDB compatibility assessment, DMS-based migration, slow-query diagnosis, major version upgrades (4.0->5.0->8.0), Well-Architected reviews (41-check wa_r
Creates and automates custom image builds with EC2 Image Builder - Linux, Windows, and macOS AMIs, and container images to ECR. Covers the build IAM role, Amazon-managed and custom components, image recipes, infrastructure and distribution configuration (launch templates, SSM parameters, other Regio
Activate when developers have latent caching needs: slow API responses, database read bottlenecks, DynamoDB throttling or cost, RDS/Aurora scaling pressure, Bedrock latency or cost, or adding a cache; activate when working with Redis, Valkey, Memcached, or any in-memory data store, cache-aside patte
Builds, runs, debugs, and operates event-driven applications using EventBridge Event Bus - a managed, centrally governed publish/subscribe event bus that an organization can share across many teams and accounts. Applicable when workloads need event-driven architectures, decoupling, choreography, asy
Related devops skillsscan passed
Post-deploy canary monitoring. (gstack)
Pre-deployment checks for router and switch configuration, including dangerous commands, duplicate addresses, subnet overlaps, stale references, management-plane risk, and IOS-style security hygiene. Use when reviewing a router or switch configuration before deployment.
Build or maintain Cloudflare Sandbox apps on the stable @cloudflare/sandbox package. Use sandbox-next for preview apps and sandbox-migrate-to-next for stable-to-preview migrations.
Deploy tRPC on WinterCG-compliant edge runtimes with fetchRequestHandler() from @trpc/server/adapters/fetch. Supports Cloudflare Workers, Deno Deploy, Vercel Edge Runtime, Astro, Remix, SolidStart. FetchCreateContextFnOptions provides req (Request) and resHeaders (Headers) for context creation. The
Prepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.
Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js/Angular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI/CD, or configuring Blaze bil