Network security: security groups, NACLs, WAF and Shield
Space Llama compares security groups with network ACLs, then covers AWS WAF, AWS Shield, AWS Firewall Manager and AWS Network Firewall, and shows how they layer up in front of a web application.
Diagrams in this video · 1Free in archhy
The diagrams, full size
Copy any of them into archhy, free, and change it for your own system.
After this lesson you can
- Compare security groups and network ACLs
- Explain what AWS WAF protects against
- Tell AWS Shield Standard and AWS Shield Advanced apart
- Describe the jobs of AWS Firewall Manager and AWS Network Firewall
Transcript
Network security: security groups, NACLs, WAF and Shield
This lesson is about keeping unwanted traffic away from your applications. We'll compare security groups with network ACLs. The exam loves that one. Then AWS WAF, AWS Shield, AWS Firewall Manager and AWS Network Firewall. And a diagram showing how the layers stack up.
Security groups vs network ACLs
Both are firewalls inside your VPC. They just work at different levels. A security group works at the instance level. It wraps an EC2 instance or a database. It's stateful. If a request is allowed in, the reply is allowed back out automatically. It has allow rules only. Anything you don't allow is denied. A new security group allows no inbound traffic, and AWS checks all its rules together. A network ACL, or access control list, works at the subnet level. It's stateless. Return traffic needs its own rule, or it gets dropped. It has both allow and deny rules, so it can block a specific IP address. Its rules are checked in number order, lowest first, and the first match wins. The default network ACL allows all traffic, so security groups do most of the work.
AWS WAF
Security groups look at addresses and ports. They can't read a web request. AWS WAF can. It's a web application firewall, working at layer seven, the application layer. It blocks common web exploits, like SQL injection and cross-site scripting. You use it with Amazon CloudFront, Application Load Balancers, Amazon API Gateway and a few others. Its rules can match IP addresses, countries, headers and request rates. AWS also offers managed rule groups, so you don't have to write everything yourself.
AWS Shield
AWS Shield protects against distributed denial of service attacks. DDoS for short. That's when a flood of traffic tries to knock your application offline. Shield Standard is free and automatic for every AWS customer. You don't switch it on. It defends against the most common network and transport layer attacks. Shield Advanced is a paid subscription with extra protection and detailed attack reports. It includes help from the Shield Response Team during an attack. It also offers some cost protection, if an attack makes your resources scale up.
Firewalls across accounts and VPCs
Two more, with similar names and different jobs. AWS Firewall Manager lets you set firewall rules once and apply them across many accounts. It works with AWS Organizations, and manages AWS WAF rules, Shield Advanced and security groups centrally. AWS Network Firewall is a managed network firewall for your VPCs. It filters traffic entering and leaving your VPCs, and can detect and block intrusions. Firewall Manager manages. Network Firewall filters.
Diagram
Here's how the layers fit together. Follow the traffic in from the users. Users connect to Amazon CloudFront at the edge. AWS WAF and AWS Shield sit there, filtering bad requests and absorbing floods. Next comes an Application Load Balancer, which passes requests into the VPC. The VPC has two subnets, and each has its own network ACL at its boundary. The public subnet holds the web servers, inside their security group. The private subnet holds the database, inside its own security group. That one only accepts traffic from the web servers. Several layers, so one mistake doesn't open everything.
Recap
Time to recap. Security groups are stateful, work at the instance level, and only allow. Network ACLs are stateless, work at the subnet level, and can allow or deny. AWS WAF stops web exploits at layer seven. Shield Standard is free for everyone, and Shield Advanced adds protection and expert help. Firewall Manager manages rules across accounts. Network Firewall filters VPC traffic.
Practice and what's next
That's network security. Lots of walls, all with different doors. Practice Security and Compliance questions in Gazeek Flash. The security group ones are sneaky. The AWS app is free on the web and on Android, at flash.gazeek.com. Next up, Protecting data: encryption, KMS, CloudHSM, ACM and Macie. See you there.
Gazeek Flash · free
Exam questions on your phone
Free questions on Security and Compliance: quick-fire batches and timed exams, on the web or Android.





