Interview Prep/Networking/Security: Firewalls, SGs, NACLs & VPN

What does it mean that a security group can reference another security group?

BeginnerScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer

Situation read → Group references make rules follow instances instead of IPs.

What I'd do →

  1. Allow the database SG to accept 5432 from the app SG: --source-group sg-app
  2. Any instance with the app SG may connect, even as IPs change
  3. It also works across peered VPCs in the same region
  4. Check rules in the console or aws ec2 describe-security-group-rules --filters Name=group-id,Values=sg-db

Why → IP lists rot as autoscaling changes instances, while group membership is always current.

Interview tip → Say this is how you build tiered access without CIDRs.

All Networking questions Roadmap: Networking for DevOps

More on Security: Firewalls, SGs, NACLs & VPN