AWS Certified CloudOps Engineer - Associate (SOA-C03) free question 9 / 10 · Domain 5: Networking and Content Delivery
A login page receives floods of requests from a small number of clients. The team wants to rate limit requests to the /login path only, and leave the rest of the site without a limit. How should the rule be built in AWS WAF?
- Use a rate-based rule statement without a scope-down statement, which tracks the /login path
- Use a rate-based rule statement and add a scope-down statement that matches the /login path
- Nest the rate-based rule statement in an AND statement together with a statement that matches the /login path
- Put identical rate-based settings in two web ACLs, which share one count of the requests of the clients
Show the answer and explanation
Answer: B
Why this is correct
A rate-based rule counts incoming requests and rate limits them when they arrive too fast. This rule type can take a scope-down statement that narrows the requests the rule tracks, so a scope-down statement matching /login limits only that path. The statement cannot be nested, so it is placed directly in the web ACL or in a rule group.
Why the other options are wrong
"Nest the rate-based rule statement in an AND statement together with a statement that matches the /login path" … A rate-based statement cannot be nested inside other statements. It goes directly into the web ACL or a rule group, and a scope-down statement narrows what it tracks.
"Use a rate-based rule statement without a scope-down statement, which tracks the /login path" … Without a scope-down statement the rule tracks the aggregated requests that you define for the whole web ACL. The scope-down statement is what narrows the requests that the rule tracks.
"Put identical rate-based settings in two web ACLs, which share one count of the requests of the clients" … Each rule statement is a separate instance of the rate-based rule with its own tracking and management, so two web ACLs do not share a count.
Key points
A scope-down statement can be optional or required, depending on the other settings of the rule. The base cost of a rate-based rule is 2 WCUs, and the scope-down statement adds its own.