0
0
AWScloud~20 mins

Listener rules and routing in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Listener Rules Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does an ALB listener rule prioritize routing?

An Application Load Balancer (ALB) has multiple listener rules configured. How does the ALB decide which rule to apply when a request matches multiple rules?

AThe ALB applies the rule with the highest priority number.
BThe ALB applies the rule with the lowest priority number.
CThe ALB applies the rule that was created most recently.
DThe ALB applies all matching rules in parallel.
Attempts:
2 left
💡 Hint

Think about how priority numbers work in ordering rules.

Configuration
intermediate
2:00remaining
Which listener rule configuration routes traffic to a target group for path '/images/*'?

You want to route all requests with paths starting with '/images/' to a specific target group. Which listener rule condition correctly matches this path pattern?

APath pattern is '/images/*'
BPath is exactly '/images/*'
CPath is '/images/*' (wildcard supported)
DHost header is '/images/*'
Attempts:
2 left
💡 Hint

Listener rules use path patterns, not exact path or host header for this.

Architecture
advanced
2:00remaining
What happens if no listener rule matches a request?

An ALB listener receives a request that does not match any configured listener rule. What is the expected behavior?

AThe ALB retries the request on another listener.
BThe ALB returns a 404 Not Found error to the client.
CThe ALB drops the request without response.
DThe ALB forwards the request to the default target group of the listener.
Attempts:
2 left
💡 Hint

Consider what the default target group is used for in a listener.

security
advanced
2:00remaining
Which listener rule condition can help restrict traffic to a specific domain?

You want to ensure your ALB only routes requests coming from 'example.com'. Which listener rule condition should you use?

AHost header condition with 'example.com'
BSource IP condition with 'example.com'
CPath pattern condition with '/example.com/*'
DHTTP method condition with 'example.com'
Attempts:
2 left
💡 Hint

Think about how domain names are represented in HTTP requests.

Best Practice
expert
3:00remaining
How should you design listener rules for efficient routing with many path patterns?

You have an ALB with many path-based listener rules. What is the best practice to optimize routing performance and maintainability?

ACreate one listener rule per path and assign the same priority to all.
BUse a single listener rule with a complex regex path pattern.
CGroup related paths into fewer rules with clear, non-overlapping path patterns and use priority numbers carefully.
DUse many low-priority rules with overlapping path patterns.
Attempts:
2 left
💡 Hint

Think about how priority and rule clarity affect routing.