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 →
- Allow the database SG to accept 5432 from the app SG:
--source-group sg-app - Any instance with the app SG may connect, even as IPs change
- It also works across peered VPCs in the same region
- 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.
More on Security: Firewalls, SGs, NACLs & VPN
Security group versus NACL: explain the differences.BeginnerHow do you let only your office IP SSH into a server?BeginnerStateful versus stateless firewalls: what is the practical difference?BeginnerWhat is a WAF and where do you place it?BeginnerWhat is the difference between a site-to-site VPN and a client VPN?BeginnerHow does DNAT or port forwarding work on a Linux gateway?Beginner