1 Answers
Short answer is: you just can’t!
Security groups do not allow an explicit deny. There’s only an implicit deny, and you then specify what rules for allowed traffic. There is no way to make an explicit deny to a security group.
NACL’s are the TRUE firewalls to a service. Even from a security standpoint, it wouldn’t make sense to spend so much time blocking specific traffic to a single IP to every single device. This means unless you just have a blanket security group rule (ill-advised) you would have to go through a ton of Security Groups to remove this IP for every single one of them. Instead, by applying such a deny to the NACL, it applies to the entire subnet and everything within it.
Ok, found the answer: https://acloudguru.com/forums/aws-certified-security-specialty/why-are-security-groups-not-a-valid-option-for-blocking-incoming-traffic-from-a-given-ip-range-on-an-alb
I had the same question. This is helpful thank you