What is the primary purpose of a security group for EC2 instances in a VPC?
Select an answer to reveal the explanation.
Short Explanation
A security group is the instance's personal stateful firewall — allow what you need on the way in, and return traffic is handled for you. Associate it with the instance (or ENI), not with IAM passwords.
Full Explanation
Security groups are stateful virtual firewalls that control inbound and outbound traffic for associated ENIs/instances. Allowed inbound traffic is automatically permitted outbound in response. At CLF depth, identify security groups as instance-level traffic control, contrasting with subnet-level network ACLs.