You hit "RulesPerSecurityGroupLimitExceeded". What are your options?
IntermediateScenarioSecurity: Firewalls, SGs, NACLs & VPN
Answer
Situation read → Default 60 inbound and 60 outbound rules per SG, and 5 SGs per ENI.
What I'd do →
- Replace many CIDR rules with a managed prefix list, which counts as one rule by default (
aws ec2 create-managed-prefix-list) - Reference security groups instead of CIDRs
- Split rules across several SGs attached to the same ENI
- Request a quota increase, noting that rules x groups per ENI has a ceiling
- Clean unused rules with an audit script
Why → Prefix lists collapse hundreds of CIDRs into one reusable object.
Interview tip → Mention prefix lists are shareable across accounts with RAM.
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?BeginnerWhat does it mean that a security group can reference another security group?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?Beginner