CLOUD COMPUTING / TECHNICAL EXPLAINER

AWS SCS-C03: WAF and Shield for Public Applications

Internet-facing applications must handle both application-layer abuse and volumetric denial-of-service attacks. AWS WAF and AWS Shield address different parts of that problem. AWS WAF inspects […]

In this article

Internet-facing applications must handle both application-layer abuse and volumetric denial-of-service attacks. AWS WAF and AWS Shield address different parts of that problem. AWS WAF inspects HTTP(S) requests and applies web ACL rules based on attributes such as IP addresses, headers, query strings, cookies, URI paths, rates, or managed rule signatures. AWS Shield provides DDoS protection, with Shield Standard included for AWS customers and Shield Advanced adding enhanced detection, mitigation, response, and protected-resource capabilities.

The topic aligns directly with AWS Certified Security – Specialty (SCS-C03), with SAA-C03 and DOP-C02 providing architecture and operations context.

Use WAF for HTTP request control

AWS WAF protects supported application resources by evaluating web requests against rules in a web ACL. It can allow, block, count, challenge, or otherwise handle requests according to supported actions and configuration.

Common protections include IP reputation, SQL injection, cross-site scripting, bot behavior, geographic restrictions, and application-specific patterns.

The firewall should be tuned to the application rather than deployed as an unchanged generic template.

Start with managed rule groups, then tune

AWS Managed Rules and partner rule groups can cover common web vulnerabilities and reputation signals quickly. Begin in count or monitored modes where appropriate to understand legitimate traffic before enforcing broadly.

Review sampled requests and false positives. One rule designed to block malicious input can accidentally affect legitimate API calls that contain unusual but valid payloads.

The approved vulnerability context is useful, but WAF rules should follow actual web attack patterns rather than only known CVE names.

Use rate-based rules for abusive request patterns

Rate-based rules can detect and control sources that exceed request thresholds over the configured evaluation window. They are useful for scraping, login abuse, expensive endpoint flooding, and some application-layer DDoS patterns.

Choose aggregation keys and thresholds from legitimate traffic. NAT gateways, proxies, and corporate egress can make many users appear behind one IP.

Shield Advanced application-layer protection also relies on WAF web ACL design for protected resources.

Understand Shield Standard and Shield Advanced

Shield Standard provides automatic baseline DDoS protection for AWS customers. Shield Advanced is a subscription service with expanded detection, mitigation, response, visibility, and DDoS cost-protection capabilities for eligible protected resources.

Shield Advanced is appropriate when business impact, attack profile, and operational response justify the additional service.

The approved DDoS attack concept helps distinguish volumetric availability threats from ordinary web exploitation.

Protect the right edge and application resources

WAF supports resources including CloudFront, Application Load Balancer, API Gateway REST APIs, AppSync, Cognito user pools, App Runner, AgentCore Gateway, and other currently supported integrations.

Place protections where they see the traffic you need to evaluate. CloudFront can absorb and filter traffic at the edge before requests reach regional applications.

Architecture should minimize alternate public paths that bypass the protected front door.

Use logging and sampled requests for tuning

WAF logs provide rule matches, actions, request attributes, labels, and other evidence useful for tuning and investigation. Route logs to approved destinations and protect them because they may contain request details.

Build dashboards for allowed, blocked, counted, challenged, rate-limited, and managed-rule events by resource and rule.

Monitoring should detect both attack spikes and sudden false-positive spikes after a rule change.

Labels and rule ordering should be used deliberately. Rules can apply labels and later rules can act on those labels, enabling layered classification and response. Web ACL rule priority determines evaluation order.

Keep rule intent documented. A complex ACL with exceptions, labels, managed groups, and rate limits can become difficult to change safely without tests.

Infrastructure as code helps preserve review history and environment consistency.

Coordinate WAF with application security

WAF reduces exposure but does not replace secure coding, authentication, authorization, input validation, patching, API rate limits, and application monitoring.

The approved detection-versus-prevention concept is useful: WAF is an inline control at one layer, while broader detection and response still need telemetry from the application and cloud environment.

Use WAF as one control in a layered architecture.

Plan response before an attack

Shield Advanced customers should know how to use dashboards, health checks, escalation, and the AWS DDoS Response Team or support paths available for their subscription and architecture.

Runbooks should identify who can change WAF rules quickly, how to raise rate limits safely, how to block a source or pattern, and how to rollback emergency changes.

Preapproved emergency procedures reduce the temptation to disable protections during a high-pressure incident.

Measure availability and false-positive impact together

A successful protection program keeps the application available while allowing legitimate users through. Track attack traffic, mitigations, origin load, WAF latency, blocked legitimate requests, and customer error rates.

The AWS edge-security model is strongest when WAF handles application-layer policy, Shield addresses DDoS resilience, and the application itself remains securely designed and observable.

Web ACL design should start with a traffic model. Understand normal request rate, geographies, user agents, API paths, payload sizes, authenticated versus anonymous traffic, and known automated clients before enforcing aggressive controls.

Use count mode during rollout for rules likely to affect legitimate traffic. Review matched requests and create narrow exceptions before switching the rule to block or challenge.

Rule groups should have clear ownership and change history. A security team may own managed rules while an application team owns business-specific URI or header rules.

Web ACL capacity units limit how much rule logic can be placed in one ACL. Complex regex and managed groups consume capacity, so architecture should remain maintainable rather than accumulating every conceivable rule.

Managed-rule versioning and updates should be monitored. New signatures can improve coverage but may change false-positive behavior, so production teams need a review process for updates according to the selected rule group.

Rule exclusions should be as narrow as possible. Excluding an entire SQL injection rule group because one endpoint sends unusual text can remove protection from unrelated parts of the application.

Scope-down statements can apply a managed rule group only to selected paths, methods, hosts, or other request attributes. This is often safer than weakening the rule globally.

Rate-based rules can aggregate on IP or other supported keys. Choose a key that matches the abuse pattern; one corporate NAT IP can represent thousands of legitimate users.

Login and password-reset endpoints often need tighter rate policy than static content. Use application-aware thresholds rather than one web-ACL-wide rate value.

Bot traffic deserves separate treatment from DDoS. Some bots are legitimate search engines or partners, while scraping and automated abuse may require challenge, labeling, or rate limits instead of an outage-focused response.

CAPTCHA or challenge mechanisms can reduce automated abuse but affect user experience and accessibility. Apply them only where application flow can tolerate the interaction.

IP sets are useful for known allowlists or blocklists but should not become the main long-term control for dynamic attacker infrastructure. Automate feeds carefully and avoid huge manually maintained lists.

Geo matches can support business restrictions or abuse mitigation but should not be treated as identity. VPNs, proxies, and cloud networks can change apparent location.

Custom responses can provide user-friendly blocked messages but should not reveal rule internals or security details that aid evasion.

WAF logging should be protected because headers, query strings, and request paths may contain tokens or personal data. Apply redaction and access policy according to application design.

Sampled requests are useful for rapid tuning but are not a replacement for durable logs when the organization needs full forensic evidence.

CloudWatch metrics should track allowed, blocked, counted, challenged, and captcha actions per rule. Changes in the distribution can reveal attacks or misconfiguration.

Shield Advanced protection should cover eligible high-value resources according to business impact. Subscription cost should be weighed against DDoS risk, support requirements, and cost-protection value.

For application-layer protection with Shield Advanced, AWS guidance emphasizes association with a WAF web ACL and appropriate rate-based protection. Design both services together rather than subscribing to Shield and ignoring WAF configuration.

Health checks and origin monitoring improve DDoS response because the platform can distinguish attack traffic from application failure. A protected edge is useful only if the origin remains healthy.

Firewall Manager can help organizations deploy WAF and Shield-related policy consistently across many accounts. Central policy should still allow application-specific tuning where one global rule would create false positives.

Change automation should have an emergency path. Security operations may need to add a temporary block or rate rule quickly while preserving review, expiry, and rollback information.

Post-incident review should examine which rules matched, which attack paths reached the application, how autoscaling behaved, whether legitimate users were blocked, and whether runbooks were fast enough.

Public-application defense is layered. WAF reduces malicious HTTP traffic, Shield improves DDoS resilience, CloudFront and scalable origins absorb load, and secure application design prevents vulnerabilities that a perimeter rule may miss.

Origin protection should ensure users cannot bypass CloudFront or another protected edge and call the regional endpoint directly. Security groups, secret headers, origin access patterns, or service-specific controls can reduce bypass paths.

API Gateway and Application Load Balancer deployments should verify which WAF scope and Region apply to the association. CloudFront web ACLs have different scope considerations from regional resources.

Multiple applications can share managed rule strategy, but application-specific exclusions should remain close to the affected service. Central security teams should not need to weaken one rule for every account because one API has an unusual request format.

Infrastructure as code should include web ACL associations as well as rules. A correctly defined ACL provides no protection if a new production load balancer is never associated with it.

Deployment tests can send known benign and blocked requests after rollout to verify the ACL is attached and enforcement behavior matches expectations.

Rate thresholds should be revisited as traffic grows. A threshold chosen during launch can become a false-positive machine after legitimate usage increases tenfold.

Emergency block rules should have expiry or review dates. Temporary IP or URI blocks created during an incident often remain for months and create unexplained future outages.

Shield Advanced cost protection and response features depend on meeting current AWS requirements and architecture. Review eligibility and operational procedures before an attack rather than during one.

DDoS resilience also depends on origin scaling, caches, queues, and failure isolation. WAF and Shield cannot make a fragile single-instance backend highly available by themselves.

Security tests should include legitimate bursts such as product launches and partner batch traffic so rate controls are proven under realistic peaks.

The public-edge design is mature when operators can see attack traffic, adjust controls safely, protect the origin from bypass, and preserve user availability without disabling security under pressure.

API clients may react differently to challenge or CAPTCHA actions than browsers. Apply interactive actions only where the client can handle them; machine-to-machine APIs often need rate, allow/block, or token-based controls instead.

Managed bot controls and application-specific bot detection should be evaluated against legitimate automation such as search crawlers, monitoring, partners, and mobile clients. Blocking every automated pattern can break important integrations.

Security dashboards should correlate WAF actions with origin CPU, load-balancer errors, latency, and user conversion. This shows whether controls reduce malicious load without creating a customer-impacting false-positive wave.

Rule testing should include encoded payloads, alternative HTTP methods, unusual content types, and application-specific edge cases that production attackers or clients may use.

Posture should be reviewed after architectural change. Adding an API Gateway stage, new CloudFront distribution, AgentCore Gateway, or additional public endpoint may create an unprotected path unless WAF and Shield association is part of deployment policy.

The objective is resilient public service: malicious traffic is constrained early, DDoS load is absorbed, origin capacity remains healthy, and legitimate users continue to receive predictable application behavior.

Public application testing should include bypass attempts against alternate DNS names, direct load-balancer endpoints, and origin IPs. Edge controls are ineffective if attackers can reach the backend through an unprotected route.

Keep allowlists short and justified. Broad partner IP ranges can become attack paths when third-party infrastructure changes or becomes compromised.

Review managed rule exceptions after application fixes. An exclusion created for a temporary compatibility issue should be removed when the underlying endpoint no longer requires it.

WAF and Shield posture should be included in launch readiness for every new internet-facing endpoint rather than retrofitted only after abuse appears.

WAF policy should be tested during application releases that change routes, parameters, or payload formats because secure rules can become false-positive sources when the API contract evolves.

Shield and WAF runbooks should identify support contacts, protected resources, critical web ACLs, and emergency change authority before a high-volume event begins.

That operational preparation is what turns edge-security services into a reliable availability control rather than a set of static rules.

Edge-security changes should use staged rollout where possible. Apply new managed-rule settings or custom rules to a small resource set or count mode first, then expand once legitimate traffic is understood.

Retain enough WAF and Shield telemetry after an incident to compare attack shape, mitigation behavior, origin health, and customer impact during post-incident review.

Review edge protections whenever the application exposes a new hostname, path, API, or gateway so no public route bypasses the policy already protecting the rest of the service.

Keep those associations and protections part of every public-service deployment review.

Keep edge policy current.

Keep protections continuously reviewed.

Keep the protected edge continuously validated.