Network traffic is the flow of data or requests transferred across a network. AWS measures it by gigabytes or request counts for some services, and filters traffic by protocol, port, and source or destination. section 1.4.2 section 5.4
Web-shop traffic and cost
A web shop grew from 100,000 visitors in January to 500,000 in February. CDN requests and traffic increased from 25 million requests and 25 GB to 125 million requests and 125 GB. The load balancer handled 250 GB instead of 50 GB, while static-file storage stayed at 50 GB. The monthly bill rose from $112 to $472.88 because traffic growth also required more web-server and database capacity. section 1.4.2
Control traffic to and from an EC2 instance with firewall rules:
- Allow only required ports; a public web server typically needs port 80 for HTTP and port 443 for HTTPS. section 5.4
- Treat inbound and outbound traffic separately. Security groups deny inbound traffic by default but allow outbound traffic by default. section 5.4
- Remove broad outbound access when the workload requires tighter control, such as preventing a test system from sending email. section 5.4
- Keep systems that do not need public access in private subnets to reduce the attackable surface. section 5.6
Diagnosing an SSH request
An SSH request from source IP address 10.0.0.10 reaches destination IP address 10.10.0.20. The firewall allows it when a rule permits TCP traffic on port 22 between those addresses. If the request fails unexpectedly, use VPC Reachability Analyzer to simulate the path and identify configuration problems. section 5.4
Trace how an SSH request travels from source to destination while a firewall controls the traffic. section 5.4
