0
0
AWScloud~10 mins

Why VPC provides network isolation in AWS - Test Your Understanding

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

Complete the code to specify the AWS service that creates a private network isolated from others.

AWS
resource "aws_[1]" "main" {}
Drag options to blanks, or click blank then click option'
Aec2
Bvpc
Cs3
Dlambda
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing EC2 instead of VPC, which is a compute service, not a network.
Selecting S3 or Lambda, which are storage and compute services, not network.
2fill in blank
medium

Complete the code to define the CIDR block that sets the IP address range for the VPC.

AWS
resource "aws_vpc" "main" {
  cidr_block = "[1]"
}
Drag options to blanks, or click blank then click option'
A255.255.255.0
B192.168.1.1/24
C10.0.0.0/16
D0.0.0.0/0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a single IP address instead of a CIDR range.
Using 0.0.0.0/0 which means all IPs, not isolated.
3fill in blank
hard

Fix the error in the subnet resource to ensure it belongs to the correct VPC.

AWS
resource "aws_subnet" "subnet1" {
  vpc_id     = [1]
  cidr_block = "10.0.1.0/24"
}
Drag options to blanks, or click blank then click option'
Aaws_security_group.sg.id
Baws_subnet.subnet1.id
Caws_instance.web.id
Daws_vpc.main.id
Attempts:
3 left
💡 Hint
Common Mistakes
Referencing subnet or instance IDs instead of the VPC ID.
Using security group ID which is unrelated to subnet placement.
4fill in blank
hard

Fill both blanks to create a security group that allows inbound HTTP traffic only from inside the VPC.

AWS
resource "aws_security_group" "web_sg" {
  vpc_id = aws_vpc.main.id

  ingress {
    from_port   = [1]
    to_port     = [2]
    protocol    = "tcp"
    cidr_blocks = ["10.0.0.0/16"]
  }
}
Drag options to blanks, or click blank then click option'
A80
B22
C443
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 22 which is for SSH, not HTTP.
Using different ports for from_port and to_port.
5fill in blank
hard

Fill all three blanks to create a route table that directs internet traffic through the internet gateway.

AWS
resource "aws_route_table" "public" {
  vpc_id = [1]

  route {
    cidr_block = [2]
    gateway_id = [3]
  }
}
Drag options to blanks, or click blank then click option'
Aaws_vpc.main.id
B"0.0.0.0/0"
Caws_internet_gateway.main.id
D"10.0.0.0/16"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong CIDR block that does not represent all internet traffic.
Using a subnet or VPC CIDR instead of 0.0.0.0/0 for internet traffic.
Using a gateway other than the internet gateway.