0
0
AWScloud~10 mins

Auto Scaling with ELB integration 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 launch configuration name in the Auto Scaling group.

AWS
resource "aws_autoscaling_group" "example" {
  launch_configuration = "[1]"
  min_size             = 1
  max_size             = 3
  vpc_zone_identifier  = ["subnet-12345678"]
}
Drag options to blanks, or click blank then click option'
Amy_launch_config
Bexample_asg
Cmy_elb
Dsubnet-12345678
Attempts:
3 left
💡 Hint
Common Mistakes
Using the Auto Scaling group name instead of the launch configuration name.
Using subnet ID instead of launch configuration.
2fill in blank
medium

Complete the code to attach the Elastic Load Balancer to the Auto Scaling group.

AWS
resource "aws_autoscaling_group" "example" {
  launch_configuration = "my_launch_config"
  min_size             = 1
  max_size             = 3
  vpc_zone_identifier  = ["subnet-12345678"]
  [1] = ["my-elb"]
}
Drag options to blanks, or click blank then click option'
Alistener_arns
Belb_name
Ctarget_group_arns
Dload_balancers
Attempts:
3 left
💡 Hint
Common Mistakes
Using target_group_arns for classic ELB attachment.
Using incorrect attribute names.
3fill in blank
hard

Fix the error in the Auto Scaling group resource by completing the missing property for health check type.

AWS
resource "aws_autoscaling_group" "example" {
  launch_configuration = "my_launch_config"
  min_size             = 1
  max_size             = 3
  vpc_zone_identifier  = ["subnet-12345678"]
  load_balancers       = ["my-elb"]
  health_check_type    = "[1]"
}
Drag options to blanks, or click blank then click option'
AEC2
BELB
CAUTO
DTARGET
Attempts:
3 left
💡 Hint
Common Mistakes
Setting health_check_type to EC2 when using ELB.
Using invalid health check types.
4fill in blank
hard

Fill both blanks to configure the Auto Scaling group with desired capacity and termination policies.

AWS
resource "aws_autoscaling_group" "example" {
  launch_configuration = "my_launch_config"
  min_size             = 1
  max_size             = 3
  desired_capacity     = [1]
  termination_policies = ["[2]"]
  vpc_zone_identifier  = ["subnet-12345678"]
  load_balancers       = ["my-elb"]
  health_check_type    = "ELB"
}
Drag options to blanks, or click blank then click option'
A2
BOldestInstance
CNewestInstance
DDefault
Attempts:
3 left
💡 Hint
Common Mistakes
Setting desired capacity outside min and max range.
Using invalid termination policy names.
5fill in blank
hard

Fill all three blanks to define a launch configuration with AMI, instance type, and associate it with a security group.

AWS
resource "aws_launch_configuration" "my_launch_config" {
  name_prefix   = "example-"
  image_id      = "[1]"
  instance_type = "[2]"
  security_groups = ["[3]"]
}
Drag options to blanks, or click blank then click option'
Aami-0abcdef1234567890
Bt3.micro
Csg-0123456789abcdef0
Dsubnet-12345678
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet ID instead of security group ID.
Using invalid AMI or instance type values.