Interview Prep/AWS/VPC and Networking

What are the nuances of security group statefulness?

AdvancedConceptVPC and Networking
Answer

Security groups track connections, so return traffic is allowed automatically. Two surprises: if a SG rule is removed, already-tracked connections continue until they idle out or close; and if a rule allows 0.0.0.0/0 on all ports for both directions, the connection is untracked, so removing the rule does take effect immediately.

Also, tracking has idle timeouts (350 seconds for established TCP by default), which affects long-idle connections through NLB or firewalls and is fixed with TCP keepalives.

aws All AWS questions Roadmap: AWS core services

More on VPC and Networking