SECURITY & GUARD Network/application protection

Security Groups

Stateful firewall on the resources (ENIs) it is associated with.

Official AWS Reference https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html ↗
SCOPE Regional
HIGH AVAILABILITY Multi-AZ Compatible
RESILIENCE Production Grade

// DECISION LOGIC MATRIX

✓

When to Choose

You control which protocols, ports, and sources reach an EC2 instance, ALB, or RDS instance.

✕

When to Avoid

You need an explicit deny or subnet-wide blocking. Use a NACL.

// EXAM TRAPS & SIGNAL KEYWORDS

explicit deny, subnet-level, stateless

// OFFICIAL AWS REFERENCE

AWS https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html ↗

"A security group controls the traffic allowed to reach and leave the resources it is associated with. Only traffic allowed by its rules reaches the instance."

  • Security groups are stateful. Response traffic is allowed regardless of the opposite-direction rules.
  • Security groups hold allow rules only. There is no deny rule.
  • No charge for security groups. One resource can have multiple security groups.

// SECURITY GROUPS TAKEAWAYS

01

Role: Stateful firewall on the resources (ENIs) it is associated with.

02

Choose: You control which protocols, ports, and sources reach an EC2 instance, ALB, or RDS instance.

03

Avoid: You need an explicit deny or subnet-wide blocking. Use a NACL.

04

Trap: Watch for exam signals like explicit deny, subnet-level, stateless.

05

Fact: Security groups are stateful. Response traffic is allowed regardless of the opposite-direction rules.

06

Fact: Security groups hold allow rules only. There is no deny rule.

07

Fact: No charge for security groups. One resource can have multiple security groups.

// PRACTICE QUESTIONS

Ready to test your Security Groups knowledge?

30 practice questions cover Security Groups.

Start Practice →