Security-group semantics
Security groups are associated with resources or their network interfaces and contain allow rules. Their combined rules are additive rather than ordered deny lists. Stateful tracking automatically permits responses to allowed traffic within documented connection-tracking behavior. Source-group references can express tier relationships without authorizing every internet address. An app group allows TCP 8080 from the load-balancer group, while a database group allows TCP 5432 from the app group; neither needs public inbound database access for this two-tier path. Resource-level tier rules keep application access narrow and readable, letting reviewers understand which component may initiate a connection without maintaining broad public source ranges for private dependencies. Adding a “deny” security-group rule is not the supported model; remove unwanted allows or use another appropriate control rather than expecting ordered deny behavior from a group.
An app group allows TCP 8080 from the load-balancer group, while a database group allows TCP 5432 from the app group; neither needs public inbound database access for this two-tier path.
Resource-level tier rules keep application access narrow and readable, letting reviewers understand which component may initiate a connection without maintaining broad public source ranges for private dependencies.
Adding a “deny” security-group rule is not the supported model; remove unwanted allows or use another appropriate control rather than expecting ordered deny behavior from a group.