AWS WAF Tutorial: Architecture, Pricing, Use Cases, and Hands-On Guide for Security, identity, and compliance

Category

Security, identity, and compliance

1. Introduction

AWS WAF is AWS’s managed web application firewall for protecting HTTP(S) applications from common web exploits and unwanted traffic. You attach AWS WAF to supported entry points—such as Amazon CloudFront distributions, Application Load Balancers (ALB), and Amazon API Gateway REST APIs—and then define rules that allow, block, or monitor requests.

In simple terms: AWS WAF sits in front of your web app and filters incoming web requests based on rules you control (for example, “block SQL injection patterns,” “rate-limit abusive IPs,” or “only allow certain countries”). You can start with AWS Managed Rules and then add custom rules as you learn your application’s traffic patterns.

Technically, AWS WAF evaluates each incoming HTTP(S) request against a web ACL (Access Control List) containing ordered rules (custom rules and managed rule groups). Each rule can take actions such as Allow, Block, Count, and (for specific use cases) CAPTCHA or Challenge. AWS WAF emits Amazon CloudWatch metrics, supports sampled requests for investigation, and can send detailed WAF logs to Amazon Kinesis Data Firehose for storage and analysis.

The main problem AWS WAF solves is reducing application-layer attack surface (L7) and abuse (bots, scraping, credential stuffing patterns, and request floods that are not necessarily volumetric DDoS) while giving teams operational control, visibility, and a pay-as-you-go security layer integrated with AWS services.

Service status and naming note: AWS WAF is the current service. AWS WAF Classic is the legacy version and should generally be avoided for new deployments. This tutorial focuses on the current AWS WAF (often referenced in APIs/CLI as wafv2). Verify any legacy references in older blogs before following them.

2. What is AWS WAF?

Official purpose (what it is):
AWS WAF is a managed web application firewall that helps protect web applications and APIs against common web exploits that can affect availability, compromise security, or consume excessive resources.

Core capabilities: – Create and manage web ACLs that evaluate web requests. – Use AWS Managed Rules and third-party managed rule groups (via AWS Marketplace, where available) to detect common threats. – Build custom rules (e.g., match IPs, headers, URI paths, query strings, request body patterns). – Apply rate-based rules to limit repeated requests from the same source. – Improve bot defense using features like AWS WAF CAPTCHA, Challenge, and Bot Control (Bot Control is a paid managed rule group—verify current availability and pricing in official docs). – Monitor via CloudWatch metrics and investigate via sampled requests and WAF logs.

Major components (mental model):Web ACL: A container for rules, with a default action (allow/block). – Rules: The logic that inspects requests and decides an action. – Rule groups: Reusable collections of rules (your own or managed). – Managed rule groups: Curated rules maintained by AWS or sellers. – IP sets: Lists of IP addresses/CIDRs to allow/block. – Regex pattern sets: Reusable regular expressions for matching. – Logging configuration: Sends request records to Kinesis Data Firehose.

Service type:
A fully managed Layer 7 (HTTP/S) firewall and traffic filtering service (not a Layer 3/4 firewall).

Scope (regional vs global): – AWS WAF supports different scopes depending on what you protect: – CloudFront: global edge entry point; AWS WAF uses a CloudFront scope web ACL (created/managed in a specific way; commonly requires using the US East (N. Virginia) control plane region for CloudFront associations—verify in official docs for current behavior). – Regional resources: such as ALB and API Gateway REST APIs, where the web ACL is regional.

How it fits into the AWS ecosystem (Security, identity, and compliance): – Complements AWS Shield (DDoS protection) by focusing on application-layer filtering rather than volumetric network floods. – Works well with Amazon CloudFront (edge delivery), Elastic Load Balancing (ALB), and Amazon API Gateway (API front door). – Central governance can be done using AWS Firewall Manager (especially in AWS Organizations environments) to deploy policies consistently across accounts. – Visibility and investigation integrate with Amazon CloudWatch (metrics) and Kinesis Data Firehose destinations (S3/OpenSearch/CloudWatch Logs via Firehose capabilities).

3. Why use AWS WAF?

Business reasons

  • Reduce risk of breaches and downtime from common web exploits (e.g., SQL injection, XSS attempts).
  • Protect revenue and brand by reducing abusive traffic and application unavailability due to request floods.
  • Improve security posture without operating your own WAF appliances or patching WAF software.

Technical reasons

  • Tight integration with AWS entry points (CloudFront, ALB, API Gateway) where TLS is terminated and HTTP requests can be inspected.
  • Managed rule groups help you start quickly with baseline protections.
  • Granular match conditions (headers, cookies, query strings, URI path, request body) for custom logic.
  • Rate limiting to protect login endpoints, search endpoints, or expensive API operations.

Operational reasons

  • CloudWatch metrics per rule for quick insight into what is being blocked or counted.
  • Logging via Firehose enables investigations, dashboards, and alerting pipelines.
  • Rule testing approach using Count action before enforcing Block reduces the risk of false positives.

Security/compliance reasons

  • Helps implement layered controls aligned with common security frameworks (e.g., OWASP Top 10 categories).
    It does not guarantee compliance by itself—compliance depends on your full system and processes.

Scalability/performance reasons

  • Managed service that scales with request volume at supported front doors.
  • Works well for high-traffic sites when paired with CloudFront caching and origin protection.

When teams should choose AWS WAF

Choose AWS WAF when: – You host web applications or APIs behind CloudFront, ALB, or API Gateway and want managed L7 protections. – You need managed rules plus the ability to add custom application-specific filters. – You want centralized governance (Firewall Manager) for multi-account environments. – You need to mitigate abuse such as scraping, bad bots, and request floods at the app layer.

When teams should not choose AWS WAF

AWS WAF may not be the best fit when: – You need Layer 3/4 network firewalling (use AWS Network Firewall, security groups, NACLs, or third-party network firewalls). – Your workload is not HTTP/S (e.g., raw TCP services). – You need an inline proxy with full traffic decryption outside of supported AWS front doors—AWS WAF works where AWS terminates TLS and provides request context to WAF. – You require WAF protections for an on-prem endpoint without putting it behind a supported AWS service (you might front it with CloudFront/ALB or use another approach).

4. Where is AWS WAF used?

Industries

  • E-commerce and retail (protect checkout/login, reduce scraping and carding-like patterns)
  • SaaS and B2B platforms (API protection, tenant isolation patterns)
  • Media and content (protect against scraping and abusive requests)
  • Financial services (login protection, compliance-driven controls)
  • Healthcare (web portals, API endpoints with strict access patterns)
  • Education and public sector (protect public portals from common attacks)

Team types

  • Security engineering and AppSec teams defining controls and baselines
  • Platform/infra teams owning edge and ingress
  • DevOps/SRE teams operating metrics, logs, and incident response
  • Developers adding application-aware allow/deny logic (e.g., admin portal restrictions)

Workloads and architectures

  • Static + dynamic websites behind CloudFront
  • Microservices behind ALB ingress
  • Public APIs exposed via API Gateway
  • Multi-account organizations that need consistent WAF policies

Real-world deployment contexts

  • “Baseline protections” using AWS Managed Rules for new apps
  • Strict allowlists for admin endpoints
  • Rate limiting for authentication endpoints
  • Geo restrictions for region-locked services (with careful consideration for VPNs and travelers)

Production vs dev/test usage

  • Dev/test: run rules in Count mode, validate false positives, test new rule groups, and tune before enforcement.
  • Production: enforce Block/CAPTCHA/Challenge where appropriate; centralize logs; alert on spikes and anomalous patterns.

5. Top Use Cases and Scenarios

Below are realistic scenarios where AWS WAF is commonly used. Each use case includes the problem, why AWS WAF fits, and a short example.

1) Baseline OWASP protections with managed rules
Problem: New applications ship quickly, often without hardened input validation everywhere.
Why AWS WAF fits: AWS Managed Rules can detect common exploit patterns (SQLi/XSS/etc.) with minimal setup.
Example: A team launches a new marketing site with dynamic forms behind CloudFront and enables AWS Managed Rules to reduce common injection attempts.

2) Protect login endpoints from brute force and abuse (rate limiting)
Problem: Attackers repeatedly try credentials, increasing load and lockouts.
Why AWS WAF fits: Rate-based rules can throttle repeated requests per source IP (and other aggregation keys in supported configurations—verify in official docs).
Example: /login requests over a threshold trigger a block for a period.

3) Block known-bad IPs and allow trusted IPs
Problem: Persistent attacks originate from known IP ranges; admins need limited access.
Why AWS WAF fits: IP sets allow allowlist/denylist controls and quick incident response updates.
Example: Only corporate VPN IP ranges can access /admin.

4) Geographic restrictions (geo match)
Problem: A service is legally available only in certain countries.
Why AWS WAF fits: Geo match rules can block or allow based on country.
Example: Block traffic outside permitted regions, with documented exceptions for business travelers via VPN.

5) Block malicious user agents and scanners
Problem: Automated scanners probe endpoints and waste resources.
Why AWS WAF fits: Header inspection and regex pattern sets can match suspicious User-Agent strings.
Example: Block requests with user agents matching common scanner signatures (careful: user agents are spoofable).

6) Reduce impact of scraping and content harvesting
Problem: Scrapers overload search/product pages and copy content.
Why AWS WAF fits: Combine rate limits, bot control (if used), and header/cookie patterns.
Example: High request frequency with missing session cookies triggers Challenge.

7) Protect expensive endpoints (search, reports, exports)
Problem: Certain endpoints are costly, and abuse spikes costs.
Why AWS WAF fits: Rate limits, size constraints, and pattern matches reduce abusive traffic.
Example: Block requests with extremely large query strings and rate-limit /export.

8) Virtual patching for urgent vulnerabilities
Problem: A new web framework vulnerability emerges; patching app code takes time.
Why AWS WAF fits: Temporary rules can block exploit patterns at the edge/ingress.
Example: Block a specific malicious URI/query pattern associated with the CVE while application teams patch and roll out.

9) API abuse control for public APIs
Problem: Public APIs get hammered by clients or abusive automation.
Why AWS WAF fits: Attach WAF to API Gateway REST APIs and enforce request filters and rate-based rules.
Example: Rate-limit /v1/search and block malformed JSON (within WAF inspection capabilities—verify exact behavior in docs).

10) Tenant/partner isolation controls at the edge
Problem: Partners should only access specific paths or hostnames.
Why AWS WAF fits: Match Host header and URI path patterns to restrict access.
Example: Only requests with Host: partner.example.com can access /partner/*.

11) Staged deployment of security controls using Count
Problem: Enabling strict WAF rules can break legitimate traffic.
Why AWS WAF fits: Use Count for observability first, then enforce Block after tuning.
Example: Run managed rules in Count for a week, review sampled requests/logs, then convert high-confidence detections to Block.

6. Core Features

This section focuses on current, commonly used AWS WAF capabilities. If you need a capability not listed here, verify in official docs because AWS WAF evolves frequently.

Web ACLs (Access Control Lists)

  • What it does: Defines a set of rules and a default action to apply to web requests for a protected resource.
  • Why it matters: It’s the unit you attach to CloudFront/ALB/API Gateway.
  • Practical benefit: Central place to manage “allow/block/count” logic.
  • Caveats: CloudFront and regional resources use different scopes; ensure you create the correct web ACL type.

Rules and rule priority (ordered evaluation)

  • What it does: Evaluates rules in order of priority. A terminating action (e.g., Block/Allow/CAPTCHA/Challenge) stops evaluation.
  • Why it matters: Rule order determines outcomes when multiple rules could match.
  • Practical benefit: Put high-confidence allow/deny rules early; use Count rules for investigation without disruption.
  • Caveats: Misordered rules can cause unexpected blocks or allow bypasses.

AWS Managed Rules

  • What it does: Provides curated rule groups maintained by AWS for common threats.
  • Why it matters: Faster time-to-protection than writing everything yourself.
  • Practical benefit: Standard baseline protection aligned with common exploit classes.
  • Caveats: Managed rules can have false positives; start in Count mode and tune (e.g., rule exclusions) where supported.

Custom rules (match statements)

  • What it does: Allows matching on parts of HTTP requests (IP, headers, URI path, query string, body, etc.).
  • Why it matters: You can encode application-specific policy.
  • Practical benefit: Protect admin paths, block known attack patterns specific to your app.
  • Caveats: Avoid overly broad regex; it can increase false positives and operational overhead.

IP sets

  • What it does: Stores lists of IP addresses/CIDRs used in rules.
  • Why it matters: Enables quick response to abuse and structured allowlists.
  • Practical benefit: Central, reusable list of trusted corporate IP ranges.
  • Caveats: IP-based controls are less effective against distributed attacks, NATed clients, and botnets.

Regex pattern sets

  • What it does: Lets you define reusable regex patterns for request matching.
  • Why it matters: Useful for consistent matching across multiple rules.
  • Practical benefit: Maintain one set for admin path patterns used by multiple web ACLs.
  • Caveats: Regex can be complex and error-prone; test and keep patterns maintainable.

Rate-based rules (rate limiting)

  • What it does: Detects and optionally blocks requests that exceed a defined rate threshold.
  • Why it matters: Helps mitigate brute force, scraping, and abusive clients.
  • Practical benefit: Reduce load on authentication and search endpoints.
  • Caveats: Rate limiting by IP can impact shared NATs (e.g., corporate networks). Also, attackers can distribute traffic across many IPs.

CAPTCHA and Challenge

  • What it does: Presents CAPTCHA or a challenge to help confirm a request is from a legitimate client rather than automation (implementation details vary—verify in official docs).
  • Why it matters: Offers a middle ground between allow and block.
  • Practical benefit: Let humans through while slowing bots.
  • Caveats: Adds UX friction and may affect accessibility; carefully scope where used (e.g., suspicious traffic only).

Bot Control (managed)

  • What it does: A managed rule group aimed at detecting and managing bot traffic.
  • Why it matters: Bots are a major source of application abuse.
  • Practical benefit: Better bot signals than simple user-agent blocking.
  • Caveats: Typically incurs additional cost and may require tuning. Verify current pricing and capabilities.

Custom responses

  • What it does: Customize the HTTP status code and response body for blocked requests (supported contexts vary; verify in official docs).
  • Why it matters: Improves UX and troubleshooting for legitimate users.
  • Practical benefit: Show “Request blocked” with a support code or link.
  • Caveats: Be careful not to leak security details.

CloudWatch metrics and sampled requests

  • What it does: Exposes per-rule metrics and sample request details for investigation.
  • Why it matters: You need visibility to tune and operate WAF.
  • Practical benefit: Quickly identify which rule blocks traffic and why.
  • Caveats: Sampled requests are limited; for full-fidelity analysis enable WAF logging.

Logging via Kinesis Data Firehose

  • What it does: Sends detailed WAF request logs to a Firehose delivery stream for storage/analysis.
  • Why it matters: Enables forensics, dashboards, and detection engineering.
  • Practical benefit: Store logs in S3 and query via Athena, or stream to analytics.
  • Caveats: Additional costs for Firehose, storage, and queries; ensure data retention and access control.

Central management via AWS Firewall Manager

  • What it does: Lets you define and apply WAF policies across multiple accounts/resources in AWS Organizations.
  • Why it matters: Standardization and governance at scale.
  • Practical benefit: Apply baseline managed rules across all ALBs in all accounts.
  • Caveats: Requires Organizations setup; changes affect many apps—use change control.

7. Architecture and How It Works

High-level architecture

AWS WAF works by attaching a web ACL to a supported resource. Incoming HTTP(S) requests are evaluated against the web ACL rules. Depending on the first matching terminating rule action (or the default action), requests are allowed to reach your origin or are blocked/challenged.

Request/data/control flow

  • Control plane (configuration): 1. You create a web ACL and add rules/rule groups. 2. You associate the web ACL with CloudFront/ALB/API Gateway. 3. Optionally configure logging to a Kinesis Data Firehose stream.
  • Data plane (traffic): 1. Client sends HTTP(S) request to CloudFront/ALB/API Gateway. 2. AWS WAF evaluates the request against rules (in priority order). 3. If allowed, request proceeds to the origin (ALB target/ECS/EKS/EC2/Lambda/API backend). 4. Metrics are emitted to CloudWatch; sampled requests and/or logs are recorded.

Integrations with related services

Common integrations include: – Amazon CloudFront: Edge distribution + WAF web ACL for global web properties. – Elastic Load Balancing (Application Load Balancer): Regional ingress for apps in VPC. – Amazon API Gateway (REST APIs): Protect public API endpoints (verify exact API types supported in your region). – Amazon CloudWatch: Metrics and alarms. – Amazon Kinesis Data Firehose: WAF logging delivery to destinations like S3/OpenSearch (destination support depends on Firehose features in your region). – AWS Firewall Manager: Central policy management across accounts. – AWS Shield: Complementary DDoS protection (Shield Standard is enabled by default on some AWS services; Shield Advanced is optional and paid).

Dependency services

  • For CloudFront protection, you’ll have a CloudFront distribution.
  • For ALB protection, an ALB in a VPC and targets.
  • For logging, Kinesis Data Firehose and a destination like S3.

Security/authentication model

  • AWS WAF uses AWS IAM for management actions (create/update web ACLs, rule groups, logging config).
  • Use least privilege and separate roles for:
  • WAF administrators (policy management)
  • Security operations (read-only + log access)
  • CI/CD automation (scoped update permissions)

Networking model

  • AWS WAF is not deployed into your VPC as a traditional appliance.
  • It evaluates requests at the supported service boundary (CloudFront edge locations or regional front doors like ALB/API Gateway).
  • TLS is typically terminated at CloudFront/ALB/API Gateway; WAF inspects the HTTP request after termination in that flow.

Monitoring/logging/governance considerations

  • Use CloudWatch metrics for:
  • Allowed vs blocked requests
  • Rule match counts
  • Sudden spikes (possible attacks)
  • Use WAF logs for:
  • Root cause analysis
  • False positive tuning
  • Security analytics and threat hunting
  • Use tagging for web ACLs, IP sets, and Firehose/S3 resources to track cost and ownership.
  • In multi-account setups, consider Firewall Manager and centralized logging to a security account.

Simple architecture diagram (Mermaid)

flowchart LR
  U[Users / Clients] --> CF[Amazon CloudFront]
  CF --> WAF[AWS WAF Web ACL]
  WAF --> ORIGIN[Origin: ALB or S3 or API]
  WAF --> CW[Amazon CloudWatch Metrics]
  WAF --> FH[Kinesis Data Firehose (optional logs)]
  FH --> S3[Amazon S3 (log storage)]

Production-style architecture diagram (Mermaid)

flowchart TB
  subgraph Internet
    U[Users]
    B[Bad Bots / Attackers]
  end

  U --> CF[CloudFront Distribution]
  B --> CF

  CF --> WAF[AWS WAF (CloudFront scope Web ACL)]
  WAF -->|Allow| ALB[Application Load Balancer]
  WAF -->|Block/CAPTCHA/Challenge| RESP[WAF Response]

  ALB --> EKS[EKS/ECS/EC2 App Tier]
  EKS --> DB[(Database)]
  EKS --> CACHE[(Cache)]

  WAF --> CW[CloudWatch Metrics + Alarms]
  WAF --> FH[Kinesis Data Firehose (WAF Logs)]
  FH --> S3[Central S3 Bucket (Security Account)]
  S3 --> ATH[Athena Queries]
  S3 --> SIEM[SIEM / Analytics (optional)]

  subgraph Governance
    FMS[AWS Firewall Manager (optional)]
    ORG[AWS Organizations]
  end

  ORG --> FMS
  FMS --> WAF

8. Prerequisites

Before starting the lab, ensure you have:

Account and billing

  • An AWS account with billing enabled.
  • Awareness that CloudFront, AWS WAF, Firehose, and S3 may incur charges (even at low usage).

Permissions / IAM

For a beginner lab, the simplest path is using an administrator-like role. For a least-privilege approach, you typically need permissions for: – wafv2:* (or scoped create/update for web ACLs, rule groups, IP sets, logging) – cloudfront:* (create/update distribution, associate WAF) – s3:* (create bucket, store logs) – firehose:* (create delivery stream) – iam:CreateRole, iam:PassRole (for Firehose to write to S3)

In production, split duties: – Security team manages WAF policies. – Platform team manages CloudFront/ALB/API Gateway attachments. – Observability team manages log pipelines.

Tools

  • AWS Management Console access
  • Optional: AWS CLI v2 installed and configured:
  • https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

Region availability

  • AWS WAF is available in many regions, but scope matters:
  • CloudFront scope web ACLs have specific association behavior (commonly controlled in us-east-1). Verify current requirement in official docs.
  • Regional web ACLs are created in the same region as your ALB/API.

Quotas / limits

  • AWS WAF has quotas on web ACLs, rules, rule groups, IP set sizes, etc.
  • Check Service Quotas:
  • AWS Console → Service Quotas → AWS WAF
    Quotas change over time; don’t rely on old blog numbers.

Prerequisite services for this lab

  • Amazon S3 (for a simple origin and for logs)
  • Amazon CloudFront (as the protected front door)
  • Kinesis Data Firehose (for WAF logs)

9. Pricing / Cost

AWS WAF pricing is usage-based. Exact amounts vary by region and can change, so always verify on the official pricing page.

Official pricing references

  • AWS WAF pricing: https://aws.amazon.com/waf/pricing/
  • AWS Pricing Calculator: https://calculator.aws/#/

Pricing dimensions (typical model)

AWS WAF commonly charges based on: – Number of web ACLs you create/use – Number of rules (and/or rule groups) in the web ACL – Number of web requests processed by the web ACL – Managed rule groups: some are included in the base model; others (e.g., advanced bot protections or marketplace rule groups) may have additional fees. Verify current pricing and which managed groups incur extra charges.

Free tier

AWS WAF generally does not have a broad “always-free” tier comparable to some other AWS services. Some accounts may have promotional credits, but do not assume WAF is free. Verify in the pricing page and your account’s free tier dashboard.

Cost drivers

Direct cost drivers: – High request volume at CloudFront/ALB/API Gateway – Large number of enabled rules and managed rule groups – Paid managed rule groups (e.g., bot-related add-ons)

Indirect/hidden cost drivers: – Kinesis Data Firehose costs for log ingestion and delivery – S3 storage for logs and lifecycle retention – Athena query costs if you analyze logs frequently – CloudWatch costs if you export logs to CloudWatch Logs or create many alarms/dashboards – CloudFront and origin costs (data transfer and requests)

Network/data transfer implications

  • AWS WAF itself is applied at the front door; it doesn’t add separate data transfer line items the way a proxy might.
  • CloudFront and your origin services still incur their usual request/data transfer costs.
  • WAF logs delivered to S3 will increase storage and query traffic.

How to optimize cost

  • Start with a small number of high-value rules (managed baseline + one or two custom rules).
  • Use Count mode strategically, but avoid leaving noisy Count rules indefinitely in production if they encourage unnecessary rule evaluations.
  • Reduce log volume:
  • Log only what you need (AWS WAF logging is typically “all requests evaluated by WAF”; if you need sampling or filtering, do it downstream).
  • Apply S3 lifecycle policies to move logs to cheaper storage or expire.
  • Use CloudFront caching and origin protection to reduce expensive origin hits (separate from WAF cost, but improves overall cost posture).

Example low-cost starter estimate (conceptual)

A small demo setup might include: – 1 CloudFront distribution with 1 web ACL – A small number of rules (e.g., one managed rule group + one custom rule + one rate-based rule) – Low traffic volume (developer testing) – Optional logging to S3 via Firehose for a limited period

To estimate: 1. Use the AWS Pricing Calculator. 2. Add AWS WAF usage: web ACL count, rule count, and request volume. 3. Add CloudFront request/data transfer, S3 storage, Firehose ingestion.

Because prices vary and change, do not copy numbers from blogs—use the calculator for your region and expected volume.

Example production cost considerations

In production, costs are typically driven by: – Large request volumes (especially on busy consumer sites) – Multiple web ACLs across environments/accounts – Several managed rule groups (some may be paid add-ons) – Centralized logging at scale (Firehose + S3 + analytics)

A practical approach is to: – Baseline costs with WAF metrics and request volume. – Run a proof-of-value with logs for a few weeks. – Right-size rules and retention once you know typical attack patterns.

10. Step-by-Step Hands-On Tutorial

This lab builds a real, small setup: CloudFront + S3 origin protected by AWS WAF, including one custom block rule, one rate-based rule, and optional logging to S3 via Firehose.

Objective

  • Create an AWS WAF web ACL (CloudFront scope).
  • Add:
  • A custom rule that blocks a known test query string (bad=1)
  • A rate-based rule to mitigate bursts from a single IP
  • (Optional but recommended) an AWS Managed Rule group in Count mode for safe evaluation
  • Associate the web ACL with a CloudFront distribution that serves content from S3.
  • Validate that:
  • Normal requests succeed
  • Requests matching the rule are blocked
  • Metrics/logs show the activity
  • Clean up all resources.

Lab Overview

You will create: – 1 S3 bucket with a simple index.html – 1 CloudFront distribution with the S3 bucket as origin – 1 AWS WAF web ACL (CloudFront scope) attached to the distribution – (Optional) 1 Kinesis Data Firehose stream + S3 bucket/prefix for WAF logs

Estimated time: 45–90 minutes (CloudFront propagation and deletion can add time).
Cost: low for brief testing, but not free—AWS WAF and CloudFront may incur charges.


Step 1: Create an S3 bucket with a simple page (origin)

Goal: Create a stable origin for CloudFront.

  1. Open the Amazon S3 console.
  2. Create a bucket (globally unique name), for example: – my-waf-lab-origin-<random-suffix>
  3. Keep Block Public Access enabled (recommended).
  4. Upload a simple index.html file.

Example index.html:

<!doctype html>
<html>
  <head><title>AWS WAF Lab</title></head>
  <body>
    <h1>AWS WAF Lab OK</h1>
    <p>If you can see this, CloudFront is working.</p>
  </body>
</html>

Expected outcome: Bucket exists with index.html uploaded.

Verification: – In S3 console, confirm the object is present.


Step 2: Create a CloudFront distribution pointing to S3

Goal: Create the HTTP(S) front door that AWS WAF will protect.

  1. Open the Amazon CloudFront console → Create distribution.
  2. Origin domain: select your S3 bucket (the REST endpoint origin, not “S3 website hosting” unless you intentionally need it).
  3. Origin access: – Use Origin Access Control (OAC) if the console offers it (recommended). – If you choose OAC, allow CloudFront to access the bucket by applying the generated bucket policy.
  4. Default root object: set to index.html.
  5. Leave other settings at defaults unless you have requirements.

Expected outcome: CloudFront distribution is created and begins deploying.

Verification: – Wait until the distribution status is Deployed. – Copy the distribution domain name (e.g., d123abcd.cloudfront.net). – Test:

curl -I https://d123abcd.cloudfront.net/

You should see HTTP/2 200 (or HTTP/1.1 200 depending on curl/TLS) after it is fully deployed.


Step 3: Create an AWS WAF web ACL (CloudFront scope)

Goal: Define the firewall policy.

  1. Open the AWS WAF console.
  2. Choose Web ACLsCreate web ACL.
  3. Name: waf-lab-cloudfront-acl
  4. Resource type: choose CloudFront distributions (CloudFront scope). – Important: CloudFront-scope WAF configuration may require using a specific region for management (commonly N. Virginia / us-east-1). If the console prompts you, follow it. If unsure, verify in official docs.
  5. Default action: Allow (we’ll explicitly block only what we want).

Expected outcome: A web ACL exists with default allow.


Step 4: Add a custom rule to block a test query string

Goal: Add a deterministic, easy-to-test rule.

  1. In your web ACL, add a rule named: BlockBadQueryString
  2. Rule type: Rule builder
  3. Statement: – Match request Query string (or a specific query argument if you prefer) – Condition: contains bad=1
    (Exact UI options differ; choose the closest match like “Query string contains”.)
  4. Action: Block
  5. (Optional) Configure a custom response: – Response code: 403 – Response body: "Blocked by AWS WAF lab rule: bad query string" – Add Content-Type: text/plain

Expected outcome: Requests containing bad=1 in the query string will be blocked.

Verification (later): You’ll test with curl after association.


Step 5: Add a rate-based rule to mitigate bursts

Goal: Demonstrate a practical abuse control.

  1. Add a rule named: RateLimitPerIP
  2. Rule type: Rate-based rule
  3. Rate limit: – Choose a small number suitable for a lab (for example, tens or low hundreds within the rule’s evaluation window).
    Do not set it too low or you may block yourself while testing.
  4. Scope-down statement (optional but recommended): – Apply only to a path like / for the lab, or to /login in a real app.
  5. Action: Block (or Count first, if you want to test non-disruptively)

Expected outcome: Bursty traffic from a single IP gets blocked once threshold is exceeded.

Verification (later): You’ll generate repeated requests and observe blocks/metrics.


Step 6 (Optional): Add an AWS Managed Rule group in Count mode

Goal: Show safe evaluation and observability.

  1. Add a rule: AWSManagedCommonRuleSetCount
  2. Select Add managed rule groups → choose an AWS Managed Rule group such as Core rule set / Common protections (names vary slightly in the console).
  3. Override action: Count (so it won’t block; it will just record matches)
  4. Enable visibility (metrics) for this rule.

Expected outcome: You’ll see matches in metrics without blocking legitimate traffic.

Why Count helps: You can observe how often your real traffic triggers managed rules before turning on blocking.


Step 7: Associate the web ACL with your CloudFront distribution

Goal: Put AWS WAF in the request path.

  1. In the AWS WAF web ACL, go to Associations (or during creation, choose the resource).
  2. Select your CloudFront distribution and associate.

Expected outcome: The web ACL is associated with CloudFront.

Verification: – In WAF console, confirm the associated resource shows the CloudFront distribution. – Note: It may take several minutes for propagation.


Step 8 (Recommended): Enable AWS WAF logging to S3 via Kinesis Data Firehose

Goal: Capture detailed request records for investigation.

High-level flow: AWS WAF → Kinesis Data Firehose → S3

  1. Create an S3 bucket for logs, e.g.: – my-waf-lab-logs-<random-suffix>
  2. Open Kinesis Data Firehose console → create a delivery stream: – Source: Direct PUT (WAF will deliver to Firehose) – Destination: Amazon S3 – Choose your log bucket and a prefix like waf-logs/ – Configure buffering defaults (fine for lab) – Create or select an IAM role that allows Firehose to write to the bucket
  3. Back in AWS WAF console: – Web ACL → Logging and metrics – Enable logging – Select your Firehose delivery stream

Expected outcome: WAF logs begin landing in S3 (often within minutes after traffic occurs).

Verification: – Browse the S3 log bucket prefix and confirm objects are being written after you generate traffic. – If you don’t see logs, check IAM role permissions and Firehose delivery errors.


Step 9: Generate test traffic and confirm blocking works

Goal: Confirm the rules work as intended.

Replace DISTRIBUTION_DOMAIN with your CloudFront domain name.

Test A: Normal request (should be allowed)

curl -i https://DISTRIBUTION_DOMAIN/

Expected outcome: 200 OK and the HTML content.

Test B: Trigger the custom query-string block (should be blocked)

curl -i "https://DISTRIBUTION_DOMAIN/?bad=1"

Expected outcome: 403 Forbidden (or your configured custom response code/body).

Test C: Trigger the rate-based rule (may block after threshold)

Run a burst of requests (adjust counts so you don’t accidentally lock yourself out too long):

for i in $(seq 1 200); do
  curl -s -o /dev/null -w "%{http_code}\n" "https://DISTRIBUTION_DOMAIN/?test=$i"
done

Expected outcome: Initially 200, then some 403 once the threshold is exceeded (if your rate limit is low enough and propagation is complete).


Validation

Use multiple validation methods:

  1. Browser validation – Open https://DISTRIBUTION_DOMAIN/ and confirm the page loads. – Open https://DISTRIBUTION_DOMAIN/?bad=1 and confirm it is blocked.

  2. AWS WAF CloudWatch metrics – In the WAF web ACL view, check Metrics: – Look for increases in BlockedRequests for BlockBadQueryString. – Look for CountedRequests for the managed rule group (if you enabled Count).

  3. Sampled requests – In the rule view, check Sampled requests (if available) to see example matching requests.

  4. Logs in S3 (if enabled) – Confirm log objects exist in s3://my-waf-lab-logs-.../waf-logs/ – Download one log file and inspect fields such as action, terminating rule, URI, query args, and client IP.


Troubleshooting

Common issues and practical fixes:

1) CloudFront association doesn’t appear / wrong region – Symptom: You can’t find your web ACL for CloudFront or association fails. – Fix: CloudFront-scope web ACLs have special handling. Ensure you’re in the correct console region/view as required. Verify in AWS WAF docs for CloudFront scope behavior.

2) You’re not getting blocked even with ?bad=1 – Check: – Is the web ACL definitely associated with the distribution? – Has CloudFront finished propagating changes? (Wait several minutes.) – Is the rule priority correct (is there an Allow rule earlier that terminates evaluation)? – Are you matching the correct request component (query string vs specific query parameter)? – Fix: Move the block rule to a higher priority (earlier) and re-test.

3) Rate-based rule never triggers – Check: – Is your threshold too high for your test volume? – Did you scope-down to a path that your requests don’t hit? – Fix: Lower the threshold for the lab or remove scope-down temporarily.

4) Firehose logging not delivering – Symptom: No logs appear in S3. – Check: – Firehose delivery stream status and error logs in the Firehose console. – IAM role permissions for Firehose to write to S3 (s3:PutObject, KMS permissions if bucket uses SSE-KMS). – Fix: Update the role policy, ensure bucket policy allows the role, and retry.

5) AccessDenied errors during setup – Symptom: Console shows permission errors. – Fix: Use a role with sufficient permissions for the lab, or explicitly grant WAF/CloudFront/S3/Firehose/IAM permissions needed.


Cleanup

To avoid ongoing costs, delete resources in a safe order:

  1. Disassociate AWS WAF from CloudFront – CloudFront distribution → Security/WAF settings → remove web ACL association (exact UI varies).

  2. Delete WAF logging configuration – AWS WAF web ACL → Logging and metrics → disable logging.

  3. Delete AWS WAF resources – Delete the web ACL (and any IP sets/regex sets you created).

  4. Delete Firehose delivery stream – Kinesis Data Firehose → delete the stream.

  5. Delete S3 log bucket – Empty bucket first, then delete.

  6. Delete CloudFront distribution – Disable distribution first, wait for status to deploy, then delete. – This can take time.

  7. Delete S3 origin bucket – Empty and delete the bucket.

Expected outcome: No WAF, CloudFront, Firehose, or S3 buckets remain from the lab.

11. Best Practices

Architecture best practices

  • Put AWS WAF at the earliest practical HTTP entry point:
  • Use CloudFront + WAF for global sites.
  • Use ALB + WAF for regional apps.
  • Use defense in depth:
  • Combine WAF with secure coding, authentication/authorization, Shield for DDoS, and least-privilege IAM.
  • Protect origins:
  • Use CloudFront OAC/OAI for S3 origins.
  • Restrict ALB origins to CloudFront where appropriate (origin protection patterns).

IAM/security best practices

  • Use least privilege IAM policies for WAF management:
  • Separate “WAF policy admin” from “WAF read-only investigator”.
  • Control who can:
  • Associate/disassociate web ACLs (high impact)
  • Change managed rules from Count → Block
  • In organizations, consider Firewall Manager to prevent drift.

Cost best practices

  • Avoid enabling many expensive managed protections without a plan.
  • Use Count for evaluation, then disable noisy rules.
  • Enable logging thoughtfully; apply S3 lifecycle policies and limit query frequency.

Performance best practices

  • Keep rule sets maintainable:
  • Use reusable IP sets and regex pattern sets.
  • Minimize overly complex regex and broad matches.
  • Prefer managed rules for common threats; add targeted custom rules for app-specific risks.

Reliability best practices

  • Use a staged rollout:
  • Dev/test with Count → production with Block.
  • Maintain a break-glass process:
  • How to quickly relax a rule during an outage caused by false positives.

Operations best practices

  • Set CloudWatch alarms on:
  • Sudden spikes in blocked requests
  • Spikes in allowed requests with suspicious patterns (if you have metrics for that)
  • Use dashboards to track:
  • Top rules by matches
  • Block rate over time
  • Establish an incident playbook:
  • Review logs, identify rule, apply temporary exception, follow up with root cause.

Governance/tagging/naming best practices

  • Tag WAF resources with:
  • Owner, Environment, Application, CostCenter, DataClassification
  • Use consistent naming:
  • app-env-entrypoint-waf-acl (e.g., payments-prod-cloudfront-waf-acl)

12. Security Considerations

Identity and access model

  • All configuration is IAM-controlled.
  • Use:
  • MFA for privileged roles
  • Approval workflows for policy changes (especially in production)
  • Read-only roles for auditors and investigators

Encryption

  • AWS WAF configuration is managed by AWS and stored by AWS.
  • For logs:
  • S3 supports SSE-S3 or SSE-KMS.
  • If using SSE-KMS, ensure Firehose has KMS permissions and key policy allows usage.

Network exposure

  • AWS WAF protects only HTTP/S traffic at integrated entry points.
  • It does not replace:
  • Security groups/NACLs
  • Network firewalls
  • Private networking patterns for internal services

Secrets handling

  • Avoid writing secrets into WAF custom responses or logs.
  • Treat WAF logs as potentially sensitive (they can include URIs, headers, and other request metadata; redact downstream if required).

Audit/logging

  • Use AWS CloudTrail to audit WAF configuration changes.
  • Store CloudTrail logs centrally (separate security account) in production.
  • Use WAF logs for request-level investigations.

Compliance considerations

  • AWS WAF helps implement controls for application security and monitoring, but:
  • Compliance requires end-to-end controls (secure SDLC, access controls, logging, incident response).
  • For compliance documentation, use AWS Artifact and service-specific compliance docs (verify in official sources).

Common security mistakes

  • Turning on strict managed rules in Block mode without testing (false positives causing outages).
  • Not protecting the origin (e.g., leaving ALB public and bypassable when CloudFront is intended).
  • Overreliance on IP allowlists/denylists without additional controls.
  • Storing WAF logs without proper access controls (PII/credential leakage risk if apps place sensitive data into URLs/headers).

Secure deployment recommendations

  • Start with managed rules in Count, tune, then enforce gradually.
  • Protect origins against bypass.
  • Centralize logs with strict access controls and retention policies.
  • Implement change management and automated deployment (IaC) where possible.

13. Limitations and Gotchas

AWS WAF is effective, but there are important boundaries.

Known limitations (conceptual)

  • Only protects supported HTTP/S entry points (CloudFront, ALB, API Gateway REST APIs, and other supported services per current docs).
  • Not a network firewall (no raw TCP/UDP inspection).
  • Rule evaluation and inspection have size and complexity limits (e.g., request body inspection limits; oversize handling). Verify exact limits in official docs because they can differ by integration and change over time.

Quotas

  • Quotas exist for:
  • Web ACLs per account/region
  • Rules per web ACL
  • Rule groups and IP set sizes
  • Always check Service Quotas for current numbers.

Regional constraints

  • CloudFront-scope web ACL management has special regional behavior (commonly associated with us-east-1 control plane). Verify before automating.

Pricing surprises

  • High request volume can make WAF request processing a major cost line.
  • Logging everything at scale can be expensive (Firehose + S3 + analytics).
  • Paid managed rule groups (e.g., bot-related) can add significant recurring costs.

Compatibility issues

  • Some advanced behaviors depend on the protected service (CloudFront vs ALB vs API Gateway).
  • Custom response support and certain actions may vary—verify for your integration.

Operational gotchas

  • WAF changes can take time to propagate, especially for CloudFront.
  • Rule order matters; misordered allow rules can bypass intended blocks.
  • Rate-based rules can block legitimate NATed user populations if thresholds are too low.

Migration challenges

  • Migrating from AWS WAF Classic to the current AWS WAF requires careful mapping of rules and scopes. Follow AWS migration guidance and test thoroughly. Verify in official docs for the recommended migration path.

14. Comparison with Alternatives

AWS WAF fits a specific role: managed L7 protections at AWS-supported entry points. Here’s how it compares to common alternatives.

Comparison table

Option Best For Strengths Weaknesses When to Choose
AWS WAF L7 filtering for CloudFront/ALB/API Gateway Native AWS integration, managed rules, CloudWatch metrics, Firehose logging, scalable Costs scale with requests; limited to supported entry points; not L3/4 You run apps on AWS and need managed web protections
AWS Shield (Standard/Advanced) DDoS protection Designed for DDoS, integrates with CloudFront/Route 53/ALB Not a full WAF; doesn’t replace app-layer filtering Use alongside WAF for DDoS + L7 protections
AWS Firewall Manager Multi-account governance Central policy management across org Requires AWS Organizations; adds governance complexity You need consistent WAF policies across many accounts
AWS Network Firewall L3/4 + some L7 network controls in VPC VPC-level controls, network segmentation Not a web app firewall; different threat model You need VPC network firewalling, not just HTTP filtering
Cloudflare WAF Edge WAF/CDN Strong edge network, bot features, broad integrations Non-AWS native; different ops model; potential vendor lock-in You want CDN+WAF outside AWS or multi-cloud edge
Google Cloud Armor GCP L7 protections Integrates with Google’s load balancing/CDN Not AWS-native Your workloads are primarily on GCP
Azure Web Application Firewall Azure L7 protections Integrates with Application Gateway/Front Door Not AWS-native Your workloads are primarily on Azure
Self-managed ModSecurity (Nginx/Apache) Full control, custom environments Maximum control, can run anywhere Ops overhead, patching, scaling, tuning effort You need custom inline control and accept operational burden
F5 / enterprise WAF appliances Enterprise feature depth Mature feature set, enterprise support Cost, complexity, appliance lifecycle You require specialized enterprise WAF features and have budget/ops maturity

15. Real-World Example

Enterprise example (multi-account organization)

  • Problem: A large enterprise runs dozens of web apps across multiple AWS accounts and regions. Security wants baseline protections and consistent policy enforcement, while app teams need flexibility and minimal false positives.
  • Proposed architecture:
  • CloudFront in front of public web apps; ALB for regional ingress.
  • AWS WAF web ACLs with:
    • AWS Managed Rules baseline
    • Rate limits on login and search endpoints
    • IP allowlists for admin endpoints
  • Central policy deployment via AWS Firewall Manager across AWS Organizations.
  • Centralized logging: AWS WAF logs → Firehose → S3 in a dedicated security account; analysis via Athena/SIEM.
  • CloudWatch alarms for spikes in blocked requests.
  • Why AWS WAF was chosen:
  • Native integration with CloudFront/ALB at scale.
  • Managed rules reduce time-to-baseline.
  • Firewall Manager supports governance across accounts.
  • Expected outcomes:
  • Reduced exposure to common web attacks.
  • Faster incident response due to consistent metrics/logging.
  • Reduced configuration drift across accounts.

Startup/small-team example (single product, lean ops)

  • Problem: A startup exposes a public website and API and starts seeing scraping and credential-stuffing attempts. The team has limited time to manage security infrastructure.
  • Proposed architecture:
  • CloudFront + AWS WAF in front of the site.
  • ALB behind CloudFront for application servers.
  • WAF rules:
    • Managed baseline rules (Count → Block after review)
    • Rate-based rules on /login and /api/search
    • Simple allowlist for admin paths
  • Optional lightweight logging to S3 for 7–30 days during tuning.
  • Why AWS WAF was chosen:
  • Low operational overhead and quick setup.
  • Integrates cleanly with CloudFront without deploying appliances.
  • Expected outcomes:
  • Reduced abusive traffic and origin load.
  • Better visibility into attacks without building a full security platform.

16. FAQ

1) Is AWS WAF the same as AWS WAF Classic?
No. AWS WAF Classic is the legacy version. AWS WAF (current) uses the newer model (often called wafv2 in APIs). Prefer AWS WAF for new deployments.

2) What AWS services can I attach AWS WAF to?
Commonly CloudFront, Application Load Balancers, and API Gateway REST APIs. AWS adds integrations over time—verify the current supported resources in official docs.

3) Does AWS WAF stop DDoS attacks?
It helps with some application-layer request floods and abusive patterns, but dedicated DDoS protection is handled by AWS Shield. In practice, teams often use Shield + WAF together.

4) Can AWS WAF block SQL injection and XSS?
It can detect many common patterns using managed rules and rule statements, but it’s not a substitute for secure coding. Use WAF as a compensating and layered control.

5) What is a web ACL?
A web ACL is the policy container in AWS WAF that holds ordered rules and defines a default action for requests.

6) What’s the difference between “Allow,” “Block,” and “Count”?
Allow: permit the request.
Block: deny the request (optionally with a custom response).
Count: record that the request matched (metrics/logs) but do not block—useful for testing.

7) How do I reduce false positives with managed rules?
Start in Count mode, review sampled requests/logs, then tune by excluding specific rules or adding scope-down statements (capabilities vary by managed group). Finally switch to Block.

8) Can AWS WAF protect internal-only applications?
Only if requests flow through a supported integration point. Many internal apps use internal ALBs; WAF can be associated with ALBs depending on configuration, but ensure the traffic path is correct.

9) Can attackers bypass AWS WAF by hitting my origin directly?
Yes, if your origin is directly reachable (public ALB, public API endpoint). Use origin protection patterns (restrict ALB access, use private origins, or enforce headers/certs—implementation depends on your architecture).

10) Does AWS WAF inspect HTTPS traffic?
It inspects HTTP request data after TLS termination at CloudFront/ALB/API Gateway in the integrated flow. It does not decrypt traffic independently like a man-in-the-middle proxy.

11) Where do AWS WAF logs go?
AWS WAF delivers logs to Kinesis Data Firehose. From Firehose you typically deliver to S3 (common), and optionally to other supported destinations. Verify current Firehose destination options in your region.

12) Can I use Infrastructure as Code (IaC) for AWS WAF?
Yes—AWS WAF can be managed using tools like AWS CloudFormation/Terraform/CDK. Verify the exact resource types and properties in your IaC tool’s current documentation.

13) How quickly do rule changes take effect?
It depends on integration and propagation (CloudFront changes can take longer). Plan for minutes of propagation; verify expectations in official docs for your use case.

14) Is AWS WAF good for bot protection?
It can help via rate limits, CAPTCHA/Challenge, and Bot Control managed rules. Effectiveness depends on tuning and your threat model.

15) What’s the best way to operate AWS WAF day-to-day?
Monitor metrics, alert on anomalies, review logs during incidents, and maintain a change process for rule updates. Use Count mode for testing changes.

16) Should I enable logging for all web ACLs?
Not always. Logging is valuable but can be expensive at high volume. Many teams enable full logging during tuning or incidents, and otherwise rely on metrics plus sampled requests.

17) Can AWS WAF block by country?
Yes, via geo match rules. Use carefully—geo blocking can affect legitimate travelers and VPN traffic.

17. Top Online Resources to Learn AWS WAF

Resource Type Name Why It Is Useful
Official documentation AWS WAF Developer Guide Primary, authoritative reference for concepts, rules, logging, and integrations: https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html
Official pricing AWS WAF Pricing Current pricing dimensions and examples: https://aws.amazon.com/waf/pricing/
Pricing tool AWS Pricing Calculator Build estimates for WAF + CloudFront + logging stack: https://calculator.aws/#/
CloudFront + WAF docs CloudFront + AWS WAF docs (official) How to associate web ACLs and understand scope/propagation. Start from CloudFront/WAF sections in AWS docs (verify the latest links via docs navigation).
Logging docs AWS WAF logging (Firehose) docs Exact logging configuration, fields, and delivery considerations (verify current page from AWS WAF guide).
Governance AWS Firewall Manager docs Central policy management across AWS Organizations: https://docs.aws.amazon.com/waf/latest/developerguide/fms-chapter.html (verify current URL in docs if it changes)
Observability Amazon CloudWatch metrics for AWS WAF Understanding metric names/dimensions and alarms (navigate from WAF docs to monitoring section).
Reference architecture AWS Architecture Center Browse patterns combining CloudFront, WAF, Shield, and centralized logging: https://aws.amazon.com/architecture/
Official solution AWS WAF Security Automations (Solution) AWS Solution that helps automate WAF protections (verify current solution name and repo from AWS Solutions Library). Start here: https://aws.amazon.com/solutions/
Videos AWS YouTube (official) Recorded sessions and demos for WAF, Shield, and edge security: https://www.youtube.com/@amazonwebservices
CLI reference AWS CLI wafv2 command reference Useful for scripting and automation; verify exact commands/parameters: https://docs.aws.amazon.com/cli/latest/reference/wafv2/
Community (reputable) AWS re:Post discussions on AWS WAF Practical troubleshooting and edge cases; validate against official docs: https://repost.aws/

18. Training and Certification Providers

The following training providers are listed as requested. Evaluate current course outlines, instructors, and reviews on each site.

Institute Suitable Audience Likely Learning Focus Mode Website URL
DevOpsSchool.com DevOps engineers, SREs, cloud engineers AWS security fundamentals, WAF/edge security patterns, DevSecOps practices check website https://www.devopsschool.com/
ScmGalaxy.com Beginners to intermediate DevOps learners CI/CD + cloud basics; may include security modules check website https://www.scmgalaxy.com/
CLoudOpsNow.in Cloud operations teams Cloud operations, monitoring, security operations basics check website https://www.cloudopsnow.in/
SreSchool.com SREs, platform teams Reliability engineering, production operations, security/observability integration check website https://www.sreschool.com/
AiOpsSchool.com Ops and platform teams exploring AIOps Operational analytics, incident response concepts, automation check website https://www.aiopsschool.com/

19. Top Trainers

These sites are provided as training resources/platforms. Review current content and offerings directly on each site.

Platform/Site Likely Specialization Suitable Audience Website URL
RajeshKumar.xyz DevOps/cloud training content (verify current scope) Students, engineers seeking guided learning https://www.rajeshkumar.xyz/
devopstrainer.in DevOps training and coaching (verify current scope) DevOps engineers, freshers, teams https://www.devopstrainer.in/
devopsfreelancer.com Freelance DevOps services/training (verify offerings) Teams needing short-term expert help https://www.devopsfreelancer.com/
devopssupport.in DevOps support/training resources (verify offerings) Ops teams needing practical support https://www.devopssupport.in/

20. Top Consulting Companies

These companies are listed as requested. Confirm service details, engagement models, and references directly with each provider.

Company Likely Service Area Where They May Help Consulting Use Case Examples Website URL
cotocus.com Cloud/DevOps consulting (verify exact catalog) Architecture reviews, cloud operations, security hardening WAF policy rollout, CloudFront/ALB ingress design, logging pipeline setup https://cotocus.com/
DevOpsSchool.com DevOps/cloud consulting & training Platform engineering, DevSecOps practices WAF + Shield architecture, IaC implementation, SOC observability enablement https://www.devopsschool.com/
DEVOPSCONSULTING.IN DevOps consulting (verify exact services) CI/CD, cloud migration, security practices Secure ingress standardization, WAF rule tuning, cost optimization for logging https://www.devopsconsulting.in/

21. Career and Learning Roadmap

What to learn before AWS WAF

  • HTTP fundamentals: headers, methods, status codes, cookies, query strings
  • TLS basics: termination, certificates, where decryption happens
  • AWS networking basics: VPC, ALB, security groups, CloudFront origins
  • Identity and access: IAM users/roles/policies, least privilege
  • Logging/monitoring: CloudWatch metrics/alarms, S3 log storage

What to learn after AWS WAF

  • AWS Shield Advanced for DDoS incident response (if your risk profile requires it)
  • AWS Firewall Manager for multi-account governance
  • Threat modeling and AppSec: OWASP Top 10, secure SDLC
  • SIEM/SOAR integrations for alerting and response
  • IaC and policy-as-code for repeatable deployments

Job roles that use AWS WAF

  • Cloud security engineer
  • Application security engineer (AppSec)
  • DevOps engineer / platform engineer
  • Site Reliability Engineer (SRE)
  • Security operations analyst (with WAF log analytics)
  • Solutions architect (designing edge/ingress patterns)

Certification path (AWS)

AWS certifications change over time, but relevant tracks commonly include: – AWS Certified Solutions Architect (Associate/Professional) – AWS Certified Security – Specialty (if available; verify current AWS certification catalog) – AWS Certified Advanced Networking (for broader networking context)

Always verify current certification names and availability: https://aws.amazon.com/certification/

Project ideas for practice

  • Build a multi-environment WAF baseline (dev/stage/prod) with:
  • Managed rules in Count for dev
  • Managed rules in Block for prod
  • Automated deployment via IaC
  • Create a log analytics pipeline:
  • WAF logs → S3 → Athena → dashboards and alerts
  • Implement origin protection:
  • CloudFront + WAF in front of ALB, restrict ALB to CloudFront (pattern depends on your design—verify best practice options)
  • Design an incident playbook:
  • How to respond to a scraping attack using rate limits and temporary IP blocks

22. Glossary

  • AWS WAF: AWS managed web application firewall for HTTP(S) traffic filtering.
  • WAF Classic: Legacy AWS WAF version; generally not recommended for new deployments.
  • Web ACL: A set of ordered rules plus a default action attached to a protected resource.
  • Rule: A condition (statement) and an action (allow/block/count/captcha/challenge).
  • Rule group: A reusable collection of rules (custom or managed).
  • Managed rule group: A curated rule group maintained by AWS or a third party.
  • IP set: A named list of IP addresses/CIDRs used in WAF rules.
  • Regex pattern set: A reusable set of regex patterns for matching request components.
  • Rate-based rule: A rule that matches when request rate exceeds a defined threshold over a time window.
  • Count: Action that records matches without blocking, used for safe testing and tuning.
  • CloudFront scope / Regional scope: The scope of a WAF web ACL depending on the protected resource type.
  • Kinesis Data Firehose: Managed service used by AWS WAF to deliver logs to destinations like S3.
  • CloudWatch metrics: Time-series metrics emitted for rules/web ACLs, used for monitoring and alarms.
  • Sampled requests: A limited set of matching requests shown for investigation in the console.
  • Origin: The backend destination CloudFront fetches content from (S3, ALB, custom origin).
  • OWASP Top 10: Common classes of web application security risks.

23. Summary

AWS WAF is AWS’s managed web application firewall in the Security, identity, and compliance category, designed to filter and control HTTP(S) requests at key AWS entry points like CloudFront, ALB, and API Gateway. It matters because it reduces application-layer risk from common exploits and abuse, while providing operational visibility through CloudWatch metrics, sampled requests, and optional full logging via Kinesis Data Firehose.

From an architecture perspective, AWS WAF fits best as part of a layered edge/ingress strategy—often paired with CloudFront caching, origin protection, and (when needed) AWS Shield for DDoS. Cost is driven primarily by request volume, number of rules, and any paid managed rule groups, plus indirect costs for log delivery and storage.

Use AWS WAF when you need managed L7 protections tightly integrated with AWS front doors and you want to balance fast baseline security (managed rules) with app-specific controls (custom rules and rate limits). Next steps: implement IaC for repeatability, enable logging with a cost-aware retention strategy, and develop a tuning/incident-response playbook based on real traffic.