0
0
AWScloud~10 mins

Multi-tier architecture patterns 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 compute layer in a multi-tier AWS architecture.

AWS
resource "aws_instance" "app_server" {
  instance_type = "[1]"
  ami           = "ami-0abcdef1234567890"
}
Drag options to blanks, or click blank then click option'
Ards.instance
Bs3.bucket
Clambda.function
Dt2.micro
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing storage or database services instead of compute instance type.
Using AWS Lambda or S3 where EC2 instance type is expected.
2fill in blank
medium

Complete the code to define the database tier in a multi-tier AWS architecture.

AWS
resource "aws_db_instance" "database" {
  engine         = "[1]"
  instance_class = "db.t3.micro"
  allocated_storage = 20
}
Drag options to blanks, or click blank then click option'
As3
Bdynamodb
Cmysql
Dec2
Attempts:
3 left
💡 Hint
Common Mistakes
Using NoSQL or storage services instead of a relational database engine.
Confusing compute services with database engines.
3fill in blank
hard

Fix the error in the code to correctly configure the web tier with a load balancer.

AWS
resource "aws_lb" "web_lb" {
  name               = "web-load-balancer"
  internal           = [1]
  load_balancer_type = "application"
  subnets            = ["subnet-12345", "subnet-67890"]
}
Drag options to blanks, or click blank then click option'
Afalse
B"true"
C"false"
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around boolean values causing syntax errors.
Setting internal to true when a public load balancer is needed.
4fill in blank
hard

Fill both blanks to create a security group rule allowing HTTP traffic from anywhere.

AWS
resource "aws_security_group_rule" "allow_http" {
  type              = "ingress"
  from_port         = [1]
  to_port           = [2]
  protocol          = "tcp"
  cidr_blocks       = ["0.0.0.0/0"]
}
Drag options to blanks, or click blank then click option'
A80
B22
C443
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using SSH port 22 or HTTPS port 443 instead of HTTP port 80.
Setting different values for from_port and to_port causing partial rules.
5fill in blank
hard

Fill all three blanks to define an auto-scaling group with a launch configuration and desired capacity.

AWS
resource "aws_autoscaling_group" "asg" {
  launch_configuration = "[1]"
  min_size            = [2]
  desired_capacity    = [3]
  max_size            = 5
  vpc_zone_identifier = ["subnet-abcde", "subnet-fghij"]
}
Drag options to blanks, or click blank then click option'
Aapp_launch_config
B2
C3
Dapp_server
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect resource names for launch configuration.
Setting desired capacity less than minimum size.