An ALB must route api.example.com/images/* to the image service AND api.example.com/* to the API service. How are listener rules evaluated?
A.By rule number — lowest priority number wins, first match applies
Priority order, first match. Correct.
B.Longest match always wins regardless of priority
No longest-match semantics — pure priority order.
C.Host conditions always beat path conditions
No condition-type precedence — just rule priority.
D.Rules can't combine host and path conditions
Conditions compose freely — ANDed within a rule.
Why this answer
ALB listener rules evaluate in ascending priority order — first match wins, then the default rule. You ORDER rules so specific paths (images) evaluate before general ones. Conditions CAN combine host + path + headers + methods + query + source IP.
Correct answer: A · Last reviewed 2026-11-05
Official AWS references
Practice this interactively
Answer without seeing the solution first in the DNS & Edge Routing practice session.
Practice DNS & Edge Routing