01Chapter 1: What a security group doesA security group is a virtual firewall that controls which network traffic can reach the resources in a VPC and which traffic they can send out. This chapter covers the working model: what a security group filters, where it sits, and how it decides whether a packet gets through. Later chapters go de8 min read
02Chapter 2: Where security groups apply: network interfaces and VPCsThis chapter explains what a security group is attached to and where its boundaries lie. It assumes you know basic TCP/IP (IP addresses, CIDR notation, ports), have launched EC2 instances, understand what a VPC and a subnet are, and can run AWS CLI commands.6 min read
03Chapter 3: Reading and writing a ruleThis chapter assumes you know CIDR notation, TCP and UDP ports, and what a VPC is. You should also be able to run AWS CLI commands against a test account. Earlier chapters covered what a security group is and where it attaches. Here you learn to read a single rule and write one correctly.6 min read
04Chapter 4: Allow-only rules and implicit denyThis chapter assumes you know CIDR notation, ports and protocols. It also assumes you have created an EC2 instance and know how to run AWS CLI commands. You should know what a security group is and that it attaches to network interfaces. This chapter covers how a security group decides whether to pe7 min read
05Chapter 5: Stateful filtering and return trafficThis chapter assumes you know TCP basics (a client opens a connection from a temporary port to a server's well-known port), CIDR notation, and how to read a security group rule. It also assumes you have seen that security groups only contain allow rules. Here you will learn what "stateful" means in 7 min read
06Chapter 6: How rules combine: no ordering, multiple groups add upThis chapter explains how AWS decides whether a packet is allowed when a security group holds many rules, and when an interface has several security groups attached. It assumes you know CIDR notation, ports and protocols, what an EC2 instance and a VPC are, and that a security group holds allow-only6 min read
07Chapter 7: Choosing a source: CIDR blocks, prefix lists and groupsThis chapter assumes you know CIDR notation, can read a security group rule (direction, protocol, port range, source or destination), and understand that security groups allow traffic and deny everything else by default. It covers the three kinds of source or destination you can put in a rule, what 6 min read
08Chapter 8: Referencing one security group from anotherThis chapter assumes you know CIDR notation, how a VPC and its subnets are laid out, and how to run AWS CLI commands. It also assumes you have read the earlier chapters on rule anatomy, allow-only rules and stateful filtering. Here you will learn how a rule can name another security group as its sou7 min read
09Chapter 9: The default security group and its defaultsThis chapter assumes you know how security group rules are built and evaluated from the earlier chapters. That covers allow-only rules, statefulness, and the idea that a rule's source can be a CIDR block or another security group. Here you will see what AWS creates for you in every VPC, why its defa6 min read
10Chapter 10: Designing web, application and database tiersA tiered design splits a workload into layers, and each layer gets its own security group. The load balancer or web servers face the internet. The application servers accept traffic only from the web layer. The database accepts traffic only from the application layer. This chapter shows how to expre6 min read
11Chapter 11: Least privilege and safer administrative accessThis chapter assumes you know how security group rules are built (direction, protocol, port range, source), that rules only allow traffic, and that groups can reference each other. It focuses on one question: how do you keep rules as narrow as the workload needs, and how do you reach instances for a8 min read
12Chapter 12: Managing rules with the AWS CLI and TerraformThis chapter assumes you can run AWS CLI commands, know CIDR notation, ports and protocols, and understand that a security group is an allow-only, stateful filter attached to network interfaces in a VPC. It covers how to create, inspect, change and remove rules from the command line, and how to decl6 min read
13Chapter 13: Security groups versus network ACLsThis chapter assumes you know how security groups work: stateful, allow-only rules attached to network interfaces. It also assumes you know what a VPC and a subnet are, and that you can read CIDR notation and run AWS CLI commands. Here you will learn what a network ACL (NACL) adds, where it differs,6 min read
14Chapter 14: Troubleshooting blocked connectionsThis chapter assumes you know TCP/IP basics (CIDR, ports, protocols), how EC2 instances sit in VPC subnets, and how to run AWS CLI commands. It also assumes you have read the earlier chapters on stateful filtering, rule evaluation, security group references, and network ACLs. Here you will turn that7 min read
15Chapter 15: Quotas and keeping rule sets manageableThis chapter assumes you can read a security group rule, know that rules are allow-only and stateful, and have used CIDR blocks, prefix lists and security group references. It covers the limits AWS places on security groups, how those limits interact, and habits that keep rule sets small enough to r6 min read