AWS Cloud Practitioner Study Notes · Part 19
The OSI Model: A Practical Guide for Cloud Networking
AWS Cloud Practitioner study notes mapping the seven OSI layers to TCP, IP, ports, VPC networking, and common AWS services.
The Open Systems Interconnection (OSI) model is a seven-layer framework for understanding how data moves between computers. It is mainly a teaching and troubleshooting model, not a literal description of every modern network implementation.
This is Part 19 of the AWS Cloud Practitioner Study Notes series. The most useful AWS connections are at Layer 3 (IP routing), Layer 4 (TCP, UDP, and ports), and Layer 7 (application protocols and services).
The seven OSI layers
The correct order is Layer 7 at the top through Layer 1 at the bottom:
| Layer | Name | Main question |
|---|---|---|
| 7 | Application | What network service does the application use? |
| 6 | Presentation | How is the data formatted, encrypted, or compressed? |
| 5 | Session | How is the communication session managed? |
| 4 | Transport | How should data be delivered end to end? |
| 3 | Network | Where should the data go? |
| 2 | Data Link | How does data move across the local network? |
| 1 | Physical | How are the raw signals transmitted? |
Two common mnemonics are:
- Top to bottom: All People Seem To Need Data Processing
- Bottom to top: Please Do Not Throw Sausage Pizza Away
Layer 7 — Application
The Application layer provides network services to applications. It is the layer closest to the user, although the application itself is not the same thing as the protocol.
Common examples include:
- HTTP and HTTPS for web traffic
- FTP for file transfer
- SMTP for email delivery
- DNS for name resolution
AWS services are often discussed at this layer when they expose or process application protocols. Examples include Amazon S3 over HTTPS, Amazon API Gateway, Amazon CloudFront, Amazon Route 53 for DNS, and the AWS Management Console.
Think: “What network service is the application using?”
Layer 6 — Presentation
The Presentation layer describes how data is represented so that different systems can interpret it. Its common responsibilities are:
- Data formatting and serialization
- Encryption and decryption
- Compression and decompression
Examples include TLS/SSL, JSON, XML, JPEG, and PNG. AWS Certificate Manager (ACM) helps provision and manage certificates used for TLS. HTTPS is HTTP carried through a TLS-protected connection.
In modern Internet stacks, TLS does not always fit neatly into one OSI layer. It is commonly taught as a Layer 6 example because encryption and data representation are the closest conceptual match.
Think: “How is the data made readable and secure?”
Layer 5 — Session
The Session layer opens, maintains, and closes communication sessions between applications. It can coordinate conversations, checkpoints, and recovery between communicating systems.
Examples traditionally associated with this layer include NetBIOS and RPC. In modern web applications, session behaviour is often implemented inside application protocols, frameworks, cookies, tokens, or connection libraries instead of appearing as a separate visible layer.
Think: “How is the conversation kept alive?”
Layer 4 — Transport
The Transport layer provides end-to-end communication between applications. It handles concepts such as:
- Port numbers, which identify application endpoints
- Segmentation and reassembly
- Reliability and ordering when the protocol supports them
- Flow control and connection management
TCP and UDP
| Protocol | Characteristics | Typical uses |
|---|---|---|
| TCP | Connection-oriented, ordered, and reliable; retransmits lost data | HTTP, HTTPS, SSH, SMTP |
| UDP | Connectionless and lightweight; does not provide built-in ordering or retransmission | DNS, streaming, gaming, VoIP |
With TCP, the receiver acknowledges data. If a segment is lost, TCP can detect the gap and retransmit it. UDP keeps the protocol overhead low, so the application must handle reliability itself when it needs it.
Common ports to remember:
| Protocol or service | Port |
|---|---|
| HTTP | 80 |
| HTTPS | 443 |
| SSH | 22 |
| RDP | 3389 |
| DNS | 53 |
AWS security groups let you define allowed protocols, ports, and sources or destinations. They are stateful resource-level firewalls, not standalone OSI transport devices, but their TCP/UDP and port rules are strongly connected to Layer 4 exam questions. A Network Load Balancer can also use TCP, TLS, UDP, or TCP_UDP listeners.
Think: “How should the data be delivered?”
Layer 3 — Network
The Network layer is responsible for logical addressing and routing between networks. Its main concepts are:
- IPv4 and IPv6 addresses
- Routing between different networks
- Choosing the next destination for a packet
- ICMP control and error messages
AWS services and features commonly mapped to this layer include:
- Amazon VPC and subnet IP ranges
- VPC route tables
- Internet gateways and NAT gateways
- AWS Transit Gateway
- VPC peering
An AWS route table contains rules with a destination, such as a CIDR block, and a target, such as an internet gateway, NAT gateway, peering connection, or VPN. Traffic is selected based on its destination IP address.
Think: “Where is the destination?”
Layer 2 — Data Link
The Data Link layer moves frames across a directly connected local network. It uses hardware or MAC addresses and is commonly associated with switches and local network delivery.
In AWS, an Elastic Network Interface (ENI) is a virtual network interface attached to a resource. It has network attributes such as private IP addresses and a MAC address. This makes ENIs useful for understanding the Layer 2 and Layer 3 boundary, although an ENI is not simply “a switch” or a pure OSI Layer 2 service.
Security groups are associated with network interfaces and control traffic to and from the resources using those interfaces. For Cloud Practitioner questions, remember the practical relationship: ENI connects the resource to the VPC; security groups control permitted traffic.
Think: “How does data reach the device on this local network?”
Layer 1 — Physical
The Physical layer carries raw electrical, optical, or radio signals. Examples include:
- Fibre-optic cable
- Ethernet cable
- Wireless radio signals
- Network interface and switching hardware
AWS customers do not configure the physical data-centre network directly. AWS manages the underlying facilities and hardware as part of the cloud infrastructure, while customers configure higher-level resources such as VPCs, subnets, routes, and security controls.
Think: “How are the bits physically transmitted?”
Example: visiting https://amazon.com
One request can be described from the top layer down like this:
| Layer | What happens |
|---|---|
| 7 Application | The browser creates an HTTPS request. DNS may resolve the hostname first. |
| 6 Presentation | TLS protects the HTTP data, and the data is represented in an agreed format. |
| 5 Session | The application and connection libraries maintain the conversation. |
| 4 Transport | TCP uses port 443 to provide ordered, reliable delivery. |
| 3 Network | IP addresses and routing determine how packets travel across networks. |
| 2 Data Link | Local-network frames use link-layer addressing for the next hop. |
| 1 Physical | Bits travel through fibre, Ethernet, or wireless media. |
The receiving system processes the layers in the reverse direction, from the physical signal back up to the application request.
AWS services by OSI layer
These are useful learning mappings, not strict claims that each AWS service implements only one layer:
| OSI layer | Common AWS examples |
|---|---|
| 7 Application | API Gateway, Amazon S3, CloudFront, Route 53, AWS Management Console |
| 6 Presentation | AWS Certificate Manager, TLS certificates and encryption |
| 5 Session | Session handling in applications, APIs, and client libraries |
| 4 Transport | Security group TCP/UDP rules, Network Load Balancer listeners |
| 3 Network | VPC, subnet CIDR ranges, route tables, internet gateway, NAT gateway, Transit Gateway |
| 2 Data Link | ENIs, MAC addresses, local-network frames |
| 1 Physical | AWS-managed data-centre networking hardware |
OSI compared with TCP/IP
The Internet uses the TCP/IP protocol suite. Its commonly taught four-layer model combines some of the OSI layers:
| OSI model | TCP/IP model |
|---|---|
| Application, Presentation, Session | Application |
| Transport | Transport |
| Network | Internet |
| Data Link, Physical | Network Access or Link |
The OSI model gives learners a detailed vocabulary for troubleshooting. The TCP/IP model more closely reflects how Internet protocols are grouped. For example, the Internet application layer combines much of the OSI Application and Presentation functionality, while IP provides the Internet-layer service and TCP or UDP provides transport.
Cloud Practitioner exam notes
Prioritise these connections:
- Layer 7: HTTP, HTTPS, DNS, CloudFront, API Gateway, S3, and Route 53
- Layer 4: TCP versus UDP, port numbers, and security-group rules
- Layer 3: IP addresses, VPCs, subnets, route tables, internet gateways, and NAT gateways
- Layer 2: MAC addresses and ENIs
- Layer 1: Physical cables and hardware managed by AWS
The exam is unlikely to require detailed packet analysis. It is more likely to test whether you can recognise the right layer for a networking concept: ports and TCP/UDP belong to Transport, IP and routing belong to Network, and HTTP/HTTPS/DNS belong to Application.
Final takeaway
Use the OSI model as a troubleshooting checklist: application service, data format, session, transport, routing, local delivery, and physical transmission. For AWS, spend the most time connecting Layers 3 and 4 to VPC networking, routes, security groups, protocols, and ports.