0
0
AWScloud~10 mins

Target groups concept in AWS - Interactive Code Practice

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

Complete the code to specify the protocol for the target group.

AWS
resource "aws_lb_target_group" "example" {
  name     = "example-tg"
  port     = 80
  protocol = "[1]"
  vpc_id   = aws_vpc.main.id
}
Drag options to blanks, or click blank then click option'
AHTTP
BFTP
CSMTP
DSSH
Attempts:
3 left
💡 Hint
Common Mistakes
Using unsupported protocols like FTP or SSH for target groups.
2fill in blank
medium

Complete the code to set the health check path for the target group.

AWS
resource "aws_lb_target_group" "example" {
  name     = "example-tg"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_vpc.main.id

  health_check {
    path = "[1]"
  }
}
Drag options to blanks, or click blank then click option'
A/login
B/healthcheck
C/admin
D/dashboard
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing paths that require login or admin access for health checks.
3fill in blank
hard

Fix the error in the target group configuration by selecting the correct target type.

AWS
resource "aws_lb_target_group" "example" {
  name        = "example-tg"
  port        = 80
  protocol    = "HTTP"
  vpc_id      = aws_vpc.main.id
  target_type = "[1]"
}
Drag options to blanks, or click blank then click option'
Ainstance-id
Bip
Cinstance
Dlambda
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'instance-id' instead of 'instance' causes configuration errors.
4fill in blank
hard

Fill both blanks to configure a target group with a sticky session and a timeout.

AWS
resource "aws_lb_target_group" "example" {
  name     = "example-tg"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_vpc.main.id

  stickiness {
    enabled  = [1]
    duration = [2]
  }
}
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
C300
D60
Attempts:
3 left
💡 Hint
Common Mistakes
Setting stickiness enabled to false disables session stickiness.
Using too high or too low duration values without understanding.
5fill in blank
hard

Fill all three blanks to define a target group with a custom health check interval, timeout, and unhealthy threshold.

AWS
resource "aws_lb_target_group" "example" {
  name     = "example-tg"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_vpc.main.id

  health_check {
    interval            = [1]
    timeout             = [2]
    unhealthy_threshold = [3]
  }
}
Drag options to blanks, or click blank then click option'
A30
B5
C3
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Setting timeout longer than interval causes errors.
Using too low unhealthy threshold may cause false alarms.