Overview
A security group is a set of rules attached to instances rather than to a network. Instances in the same group share its rules, and a rule can name another group as its source — so “the web tier may reach the database tier” becomes a rule instead of a list of addresses.Navigation: Networking → Security Groups.
Security groups versus firewall policies
Creating a group
A group needs only a name; a description is optional. A group with no rules denies all inbound traffic and permits all outbound.Rules
Rules are added per direction — ingress for inbound, egress for outbound.
The form adapts to the protocol: port fields appear for TCP and UDP, ICMP type and code for ICMP, and neither for All.
Validation you’ll see:
Rules are permissive, not ordered
Security group rules have no priority and no deny. Every rule permits something, and traffic is allowed if any rule matches. Adding a rule can only widen access; removing one is the only way to narrow it.That is the opposite of firewall policies, which are numbered and where the first match wins. Don’t carry assumptions from one model to the other.
Membership
Group membership is set when an instance is deployed and cannot be changed afterwards through the console.Deleting a group
A group that is still attached to an instance cannot be deleted. The confirmation states what goes with it: the group’s ingress and egress rules.Related
Firewall Policies
The VPC equivalent, and what most accounts use.
Networking overview
How the networking models differ.
Virtual Machines
Where group membership is set.
Public IPs
Publishing an instance.