Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a security group in AWS?
A security group is like a virtual firewall that controls the traffic allowed to reach your AWS resources, such as servers.
Click to reveal answer
beginner
Why are security groups important for AWS resources?
They protect your resources by allowing only trusted traffic, helping to keep your data and applications safe from unauthorized access.
Click to reveal answer
intermediate
How do security groups differ from traditional firewalls?
Security groups are stateful and work at the instance level in the cloud, automatically allowing return traffic without extra rules.
Click to reveal answer
beginner
Can security groups be changed after creating AWS resources?
Yes, you can update security group rules anytime, and changes apply immediately to all associated resources.
Click to reveal answer
beginner
What happens if no security group rules allow traffic to an AWS resource?
No traffic can reach the resource, effectively isolating it from the network until rules are added.
Click to reveal answer
What does a security group control in AWS?
ANetwork traffic to and from resources
BUser login credentials
CBilling and cost management
DData storage size
✗ Incorrect
Security groups control the network traffic allowed to reach AWS resources.
Are security groups stateful or stateless?
AStateless
BDepends on the resource
CStateful
DNeither
✗ Incorrect
Security groups are stateful, meaning return traffic is automatically allowed.
What happens if you remove all inbound rules from a security group?
AAll inbound traffic is allowed
BAll inbound traffic is blocked
COnly outbound traffic is blocked
DThe resource is deleted
✗ Incorrect
Removing all inbound rules blocks all inbound traffic to the resource.
Can you assign multiple security groups to one AWS resource?
AOnly for EC2 instances
BNo
COnly for databases
DYes
✗ Incorrect
You can assign multiple security groups to a single AWS resource to combine rules.
Which of these is NOT controlled by security groups?
AUser permissions
BOutbound traffic rules
CInbound traffic rules
DAllowed IP addresses
✗ Incorrect
User permissions are managed separately, not by security groups.
Explain why security groups are essential for protecting AWS resources.
Think about how a firewall works for your computer.
You got /4 concepts.
Describe how security groups differ from traditional firewalls.
Focus on how cloud security groups handle traffic differently.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of a security group in AWS?
easy
A. To control inbound and outbound network traffic to resources
B. To store data securely in the cloud
C. To manage user permissions for AWS services
D. To monitor the health of AWS resources
Solution
Step 1: Understand what security groups do
Security groups act like virtual firewalls that control network traffic to and from AWS resources.
Step 2: Identify the main function
The main function is to allow or block inbound and outbound traffic based on rules.
Final Answer:
To control inbound and outbound network traffic to resources -> Option A
Quick Check:
Security groups control traffic = A [OK]
Hint: Security groups control traffic flow to resources [OK]
Common Mistakes:
Confusing security groups with data storage
Thinking security groups manage user permissions
Assuming security groups monitor resource health
2. Which of the following is the correct way to allow HTTP traffic on port 80 in a security group rule?
easy
A. Allow inbound TCP traffic on port 80
B. Allow outbound UDP traffic on port 80
C. Allow inbound TCP traffic on port 22
D. Allow inbound ICMP traffic on port 80
Solution
Step 1: Identify the protocol and port for HTTP
HTTP uses TCP protocol on port 80.
Step 2: Match the correct rule
Allowing inbound TCP traffic on port 80 correctly allows HTTP requests.
Final Answer:
Allow inbound TCP traffic on port 80 -> Option A
Quick Check:
HTTP = TCP port 80 inbound [OK]
Hint: HTTP uses TCP port 80 inbound [OK]
Common Mistakes:
Allowing wrong protocol like UDP or ICMP for HTTP
Allowing outbound instead of inbound traffic
Using wrong port number like 22 (SSH)
3. Given a security group with these inbound rules: - Allow TCP port 22 from 0.0.0.0/0 - Allow TCP port 80 from 192.168.1.0/24 Which IP address can access port 80?
medium
A. 10.0.0.5
B. 0.0.0.0
C. 192.168.1.15
D. 172.16.0.1
Solution
Step 1: Understand the CIDR block for port 80
The rule allows TCP port 80 only from IPs in 192.168.1.0/24 range, which means 192.168.1.0 to 192.168.1.255.
Step 2: Check which IP fits the range
192.168.1.15 is inside the allowed range, others are not.
Final Answer:
192.168.1.15 -> Option C
Quick Check:
192.168.1.0/24 includes 192.168.1.15 [OK]
Hint: Check if IP fits CIDR range for allowed port [OK]
Common Mistakes:
Confusing 0.0.0.0/0 with specific ranges
Assuming all IPs can access port 80
Mixing up port 22 and port 80 rules
4. You created a security group rule to allow inbound SSH (port 22) from your office IP, but you still cannot connect. What is the most likely mistake?
medium
A. The rule allows outbound traffic instead of inbound
B. The office IP is not in the allowed CIDR range
C. The rule uses UDP instead of TCP for port 22
D. The security group is attached to the wrong resource
Solution
Step 1: Check rule direction and protocol
Inbound SSH requires TCP on port 22 inbound; if rule is correct, this is fine.
Step 2: Verify security group attachment
If the security group is not attached to the resource (like EC2 instance), rules won't apply.
Final Answer:
The security group is attached to the wrong resource -> Option D
Quick Check:
Security group must be attached to resource [OK]
Hint: Check if security group is attached to your resource [OK]
Common Mistakes:
Ignoring security group attachment
Confusing inbound and outbound rules
Using wrong protocol for SSH
5. You want to secure a web server so only your company's office IP range (203.0.113.0/24) can access HTTP (port 80), but allow SSH (port 22) from anywhere for remote admins. Which security group rules should you create?
hard
A. Allow inbound TCP port 80 from 0.0.0.0/0 and inbound TCP port 22 from 203.0.113.0/24
B. Allow inbound TCP port 80 from 203.0.113.0/24 and inbound TCP port 22 from 0.0.0.0/0
C. Allow inbound TCP port 80 and 22 both from 203.0.113.0/24 only
D. Allow inbound TCP port 80 and 22 both from 0.0.0.0/0 only
Solution
Step 1: Match HTTP access to office IP range
HTTP (port 80) should be allowed only from 203.0.113.0/24 to restrict access to office IPs.
Step 2: Allow SSH from anywhere
SSH (port 22) should be open to 0.0.0.0/0 to allow remote admins from any IP.
Final Answer:
Allow inbound TCP port 80 from 203.0.113.0/24 and inbound TCP port 22 from 0.0.0.0/0 -> Option B