0
0
AWScloud~10 mins

ALB vs NLB decision in AWS - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the load balancer type for HTTP traffic.

AWS
load_balancer = aws_lb("myLB", load_balancer_type=[1])
Drag options to blanks, or click blank then click option'
A"network"
B"gateway"
C"classic"
D"application"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'network' which is for TCP/UDP traffic, not HTTP.
Using 'classic' which is older and less flexible.
2fill in blank
medium

Complete the code to select the load balancer type for TCP traffic with high performance.

AWS
load_balancer = aws_lb("myLB", load_balancer_type=[1])
Drag options to blanks, or click blank then click option'
A"application"
B"network"
C"classic"
D"gateway"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'application' which is for HTTP/HTTPS, not raw TCP.
Using 'classic' which is outdated.
3fill in blank
hard

Fix the error in the code to create a listener for an ALB on port 80.

AWS
listener = aws_lb_listener("myListener", load_balancer_arn=alb.arn, port=[1], protocol="HTTP")
Drag options to blanks, or click blank then click option'
A80
B22
C443
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 443 which is for HTTPS.
Using port 22 which is for SSH.
4fill in blank
hard

Fill both blanks to configure a health check for an NLB on TCP port 443.

AWS
health_check = aws_lb_target_group_health_check(protocol=[1], port=[2])
Drag options to blanks, or click blank then click option'
A"TCP"
B"HTTP"
C"443"
D"80"
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP protocol for NLB health checks.
Using port 80 instead of 443.
5fill in blank
hard

Fill all three blanks to create an ALB listener rule that forwards requests with path '/app' to a target group.

AWS
rule = aws_lb_listener_rule("myRule", listener_arn=listener.arn, priority=10, action=[1], condition=[2], target_group_arn=[3])
Drag options to blanks, or click blank then click option'
A{"type": "forward"}
B{"field": "path-pattern", "values": ["/app"]}
Ctarget_group.arn
D{"type": "redirect"}
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'redirect' action instead of 'forward'.
Using wrong path pattern in condition.
Not specifying the target group ARN.