liveBook · Manning

Network traffic

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

Network traffic is the flow of data or requests transferred across a network.

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

Figure 5.8 How an SSH request travels from source to destination, controlled by a firewall

Trace how an SSH request travels from source to destination while a firewall controls the traffic. section 5.4

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains request and data measurement, firewall inspection, default rules, port selection, and one SSH troubleshooting path.
Examples
Uses a growing web shop, HTTP and HTTPS ports, outbound email prevention, and an SSH request between two IP addresses.
What it assumes
Assumes familiarity with AWS resources such as EC2 instances, ports, IP addresses, and security groups.
What you can do after
Operate/configure AWS traffic controls with security-group rules and diagnose reachability problems using VPC Reachability Analyzer.
How it connects
Connects network traffic with AWS billing, EC2, security groups, firewalls, VPCs, private subnets, and VPC Reachability Analyzer.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.