AWS Builder Center
๐Ÿšจ Day 10/30: Cloud Networking โ€” The Internet Maze! ๐ŸŒ

๐Ÿšจ Day 10/30: Cloud Networking โ€” The Internet Maze! ๐ŸŒ

๐ŸŽฎ Discover how VPCs, subnets, route tables, and security groups work together to connect your cloud architecture. Follow Rahulโ€™s college portal mission and learn how data travels safely through AWS!

Series: Cloud Computing (24 articles)

  1. โ€ฆ
  2. 11
    ๐Ÿšจ Day 10/30: Cloud Networking โ€” The Internet Maze! ๐ŸŒ This article
Tech Enthusiast | Exploring AWS, Data Structures & Web Dev

๐Ÿšจ Day 10/30: Cloud Networking โ€” The Internet Maze! ๐ŸŒ

๐ŸŽฎ Mission 10: Connect the Cloud!

โ˜๏ธ 30-Day Cloud Computing & Cloud Architecture Challenge
๐Ÿง‘โ€๐Ÿ’ป Your Role: Cloud Architect
๐Ÿซ Your Project: College Examination Portal
๐ŸŽฏ Your Mission: Connect every cloud component and make Rahul's exam registration work!

๐Ÿšจ LEVEL 1: OH NO! THE PORTAL IS STUCK!

It's 9:00 AM. โฐ
Our college has just opened semester examination registration.
Thousands of students rush to the portal!
Rahul opens his laptop, logs in, selects his subjects, and clicksโ€ฆ
๐ŸŸข REGISTER NOW!
But suddenlyโ€ฆ
โณ Connecting to the serverโ€ฆ
โŒ Request timed out!
Rahul: "BROOO! My registration! ๐Ÿ˜ญ"
The development team checks the cloud infrastructure.
๐Ÿ–ฅ๏ธ EC2 application servers? Running!
๐Ÿ—„๏ธ Database? Available!
๐Ÿ“ฆ Student documents in S3? Safe!
Then why isn't the portal working? ๐Ÿค”
Here's the twistโ€ฆ
Having all the right components isn't enough. Those components must also be able to communicate with one another!
Welcome to today's adventure: CLOUD NETWORKING! ๐ŸŒ

๐Ÿ—บ๏ธ LEVEL 2: ENTER THE CLOUD CITY!

Imagine AWS is a gigantic futuristic city. ๐Ÿ™๏ธ
Your application lives inside this city, and every component has a job.
  • ๐ŸŒ The internet connects users to your application.
  • ๐Ÿซ The VPC is your private campus inside the city.
  • ๐Ÿ›ฃ๏ธ Routes help traffic find its destination.
  • ๐Ÿšช Security rules decide which connections are allowed.
  • ๐Ÿ–ฅ๏ธ EC2 servers process application requests.
  • ๐Ÿ—„๏ธ The database remembers student registrations.
But there's one problem: the city needs a proper road system!

โ˜๏ธ Meet Amazon VPC โ€” Your Private Cloud Campus

Amazon VPC stands for Virtual Private Cloud.
It provides a logically isolated virtual network in AWS where you can deploy resources and configure how they communicate.
Think of it as building your own campus inside a huge city. ๐Ÿซ
You decide how to organize the network, which routes to configure, and which connections to permit.

๐Ÿ—บ๏ธ Figure 1: Our Cloud Campus

1
2
3
4
5
6
7
8
9
10
11
โ˜๏ธ AWS CLOUD
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ OUR VPC โ”‚
โ”‚ โ”‚
โ”‚ ๐Ÿ–ฅ๏ธ Application Servers โ”‚
โ”‚ โ”‚
โ”‚ ๐Ÿ—„๏ธ Database โ”‚
โ”‚ โ”‚
โ”‚ ๐Ÿ“ฆ Other Cloud Resources โ”‚
โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ’ก Mini-Mission: What is a VPC most like?
A) ๐ŸŽ’ A school backpack
B) ๐Ÿซ A private campus with its own network
C) ๐ŸŽฎ A video game character
โœ… Answer: B! A VPC provides a logically isolated virtual network for cloud resources.
โญ Mission Progress: 1/5

๐Ÿ˜๏ธ LEVEL 3: THE TWO ZONES OF CLOUD CITY

Inside our virtual campus, we need to decide where different resources should live.
Imagine two areas:
๐ŸŒ Public Zone: The entrance area where visitors can reach a public-facing service.
๐Ÿ”’ Private Zone: Restricted areas where application servers and databases can live without direct inbound access from the public internet.
In AWS, we use subnets to divide a VPC's IP address range into smaller network ranges. Each subnet belongs to one Availability Zone.

๐ŸŒ Public Subnet vs. ๐Ÿ”’ Private Subnet

๐ŸŒ Public Subnet โ€” The Campus Entrance
  • Can have a route to an Internet Gateway.
  • Can host an internet-facing load balancer.
  • Needs appropriate routing, addressing, and security configuration.
๐Ÿ”’ Private Subnet โ€” The Restricted Campus Area
  • Doesn't have a direct route to an Internet Gateway.
  • Commonly hosts application servers and databases.
  • Can still have controlled connectivity through other network components.
๐Ÿ’ก Cloud Architect Tip: A subnet isn't public simply because we call it โ€œpublic.โ€ Its routing configuration determines whether it has a route to an Internet Gateway. Public IP addressing and security rules also matter for actual internet reachability.
For our college portal, we can place the internet-facing load balancer in public subnets and the application servers and database in private subnets.

๐Ÿ—บ๏ธ Figure 2: Organizing Our Cloud Campus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
๐ŸŒ INTERNET
|
v
๐ŸŒ INTERNET GATEWAY
|
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ OUR VPC โ”‚
โ”‚ โ”‚
โ”‚ ๐ŸŒ PUBLIC SUBNET โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ โš–๏ธ Load Balancerโ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ | โ”‚
โ”‚ ๐Ÿ”’ PRIVATE SUBNET โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€vโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ ๐Ÿ–ฅ๏ธ EC2 Servers โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ | โ”‚
โ”‚ ๐Ÿ”’ PRIVATE DATA AREA โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€vโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ ๐Ÿ—„๏ธ Database โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐ŸŽฏ Our design principle: Public access should be limited to the components that need it. The database doesn't need to be directly exposed just because students use the portal.

๐Ÿ“ LEVEL 4: IP ADDRESSES โ€” EVERY DESTINATION NEEDS AN ADDRESS!

Imagine Rahul wants to send a letter to the college examination office.
How will the letter reach the correct building?
It needs an address! ๐Ÿ“ฌ
Networks work in a similar way. Devices and network interfaces use IP addresses to identify network destinations.
๐Ÿ“ Private IP address: Used for communication within private networks and other configured network paths.
๐ŸŒ Public IP address: Can be routable over the public internet when the necessary networking and security configuration is in place.
Not every cloud resource needs a public IP address.
For example, an application server can receive requests from a load balancer over the VPC network without being directly accessible from the internet.
๐Ÿ”‘ Remember: An IP address identifies a network destination. It doesn't automatically grant permission to access that destination.

๐Ÿงญ LEVEL 5: ROUTE TABLES โ€” THE GPS OF THE CLOUD!

Imagine Rahul enters the campus but doesn't know how to reach the examination department.
He checks a campus map. ๐Ÿ—บ๏ธ
The map shows which path leads to his destination.
In AWS, route tables help determine where network traffic should go.
A route table contains rules that specify a destination and a target.
For example:
  • ๐Ÿซ Traffic destined for the VPC's own address range can use the local route.
  • ๐ŸŒ Internet-bound traffic from a suitably configured public subnet can use an Internet Gateway route.
  • ๐Ÿ”— Traffic to other networks may use other configured targets.

๐Ÿ—บ๏ธ Figure 3: Follow the Network GPS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
๐Ÿ“จ Network Traffic
|
v
๐Ÿงญ ROUTE TABLE
|
v
๐Ÿ”Ž Check Destination IP
|
โ”Œโ”€โ”€โ”ดโ”€โ”€โ”
| |
v v
VPC Internet
Traffic Traffic
| |
v v
Local Internet
Route Gateway
| |
v v
Internal ๐ŸŒ Internet
Resource
๐Ÿ’ก Remember: A route table tells traffic where to go. It doesn't automatically grant permission to access the destination.
For that, we need our next security checkpoint!

๐Ÿ›ก๏ธ LEVEL 6: SECURITY GROUPS โ€” THE CLOUD BOUNCERS!

Imagine the college has a room containing confidential examination records.
Should every student be allowed to enter? ๐Ÿ˜ณ
Of course not!
Only authorized connections should be allowed.
An AWS Security Group acts as a virtual firewall for associated resources. Its rules control permitted inbound and outbound network traffic.
For our college portal, we could configure rules such as:
  • ๐ŸŒ Allow students to access the public website over HTTPS.
  • โš–๏ธ Allow application servers to receive the required traffic from the load balancer.
  • ๐Ÿ—„๏ธ Allow the database to accept connections on its required port from authorized application servers.
  • ๐Ÿšซ Don't allow unrestricted internet clients to connect directly to the database.
Security Groups are stateful, so response traffic for permitted connections is handled automatically.

๐Ÿšช Figure 4: Our Cloud Security Checkpoint

1
2
3
4
5
6
7
8
9
10
11
12
13
๐ŸŒ INCOMING REQUEST
|
v
๐Ÿ” SECURITY GROUP RULES
|
โ”Œโ”€โ”€โ”ดโ”€โ”€โ”
| |
v v
โœ… ALLOW โŒ BLOCK
| |
v v
Permitted Not
Connection Permitted

๐Ÿง  Super Important!

  • ๐Ÿงญ Route table: Where should traffic go?
  • ๐Ÿ›ก๏ธ Security Group: Is this traffic permitted?
They solve different problems and work together.

๐Ÿƒ LEVEL 7: THE GREAT REQUEST RACE!

Now let's follow Rahul's registration request like we're watching a video game replay! ๐ŸŽฎ
Rahul clicks Register for Examination.
Can his request reach the database and return successfully?

๐ŸŽฌ Figure 5: Watch the Request Travel

1. ๐Ÿง‘โ€๐ŸŽ“ Rahul clicks Register
His browser sends an HTTPS request to the college portal.
โฌ‡๏ธ
2. ๐ŸŒ The request reaches the load balancer
The public-facing entry point receives the request when the network configuration permits it.
โฌ‡๏ธ
3. ๐Ÿ–ฅ๏ธ An EC2 server processes the request
The load balancer forwards the request to an application server that can receive the connection.
โฌ‡๏ธ
4. ๐Ÿ” The application connects to the database
Routing and security rules must permit the application-to-database connection.
โฌ‡๏ธ
5. ๐Ÿ—„๏ธ The database processes the registration
The application saves the relevant information and receives the database result.
โฌ‡๏ธ
6. ๐ŸŽ‰ Rahul gets his response!
The application sends the result back through the established connection.
โœ… REGISTRATION SUCCESSFUL!

๐Ÿ“Š Complete Request Flow

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
๐Ÿ‘จโ€๐ŸŽ“ RAHUL
|
| HTTPS Request
v
โš–๏ธ LOAD BALANCER
|
| Forward Request
v
๐Ÿ–ฅ๏ธ EC2 APPLICATION
|
| Authorized DB Connection
v
๐Ÿ—„๏ธ DATABASE
|
| Registration Result
v
๐Ÿ–ฅ๏ธ EC2 APPLICATION
|
| Response
v
๐Ÿ‘จโ€๐ŸŽ“ RAHUL
|
v
๐ŸŽ‰ SUCCESS!
This is a simplified request flow. Real systems may also use DNS, TLS termination, APIs, and additional networking components.
But the main idea is simple: every request needs a path, and every connection needs the right permissions.

๐Ÿšจ LEVEL 8: BOSS BATTLE โ€” FIX THE BROKEN PORTAL!

Uh-oh! The portal has stopped working again. ๐Ÿ˜ฑ
The EC2 application server is running. The database is also running. But the application cannot connect to the database.
Your mission is to identify what needs investigation!

๐Ÿงฉ Challenge 1: The Unreachable Database

The database is in a private subnet. A developer tries to connect directly from a laptop on the public internet.
What's the likely issue?
A) Private resources aren't automatically directly reachable from the public internet.
B) Every database must have a public IP.
C) The laptop needs more RAM.

๐Ÿงฉ Challenge 2: The Blocked Connection

The application server has a network route to the database, but the connection is rejected by the access rules.
What should you investigate?
A) The portal's background colour.
B) The relevant Security Group rules, port, and connection configuration.
C) The number of students in the college.

๐Ÿงฉ Challenge 3: The Internet Connection

Traffic needs to reach an internet destination from a public subnet.
Which component commonly provides the VPC's internet connection?
A) Amazon EBS
B) Internet Gateway
C) Amazon RDS

๐Ÿ† ANSWER KEY

  • Challenge 1: A โ€” Private subnet resources aren't directly internet-reachable by default.
  • Challenge 2: B โ€” Network reachability alone doesn't guarantee that a connection is permitted.
  • Challenge 3: B โ€” An Internet Gateway enables VPC-to-internet communication when correctly configured.
๐ŸŽ‰ BOSS DEFEATED! You've learned to think like a cloud architect.

๐Ÿ† LEVEL 9: YOUR CLOUD ARCHITECT BADGE!

Look at what our college portal has gained over these ten days!
  • ๐ŸŒ Day 5: Where does our application live?
  • ๐Ÿ›ก๏ธ Day 6: How can it survive failures?
  • ๐Ÿ–ฅ๏ธ Day 7: What runs our application?
  • ๐Ÿ“ฆ Day 8: Where do our files live?
  • ๐Ÿ—„๏ธ Day 9: Where does our application data live?
  • ๐ŸŒ Day 10: How do all the components communicate?
Our architecture now has more than servers and storage. It has a network layout, routes, and rules that control communication.
And here's the next mysteryโ€ฆ
๐Ÿค” If a request can reach an AWS service, does that automatically mean the person or application is authorized to use it?
Not necessarily!
Networking controls communication paths. We also need to manage identities and permissions.

๐Ÿš€ COMING UP โ€” DAY 11/30

๐Ÿ” Cloud Security & IAM โ€” Who Can Access What in AWS?

Next time, we'll meet IAM users, roles, policies, and permissions.
We'll discover how to give the right identities the right access without handing everyone the keys to our cloud campus! ๐Ÿ”‘โ˜๏ธ
๐Ÿ’ฌ Your Mission Question: If our college database is inside a private subnet, does that automatically guarantee it's secure? Why or why not?
Drop your answer in the comments! ๐Ÿ‘‡
Keep learning. Keep building. And rememberโ€ฆ
๐ŸŒ A cloud without connections is just a collection of isolated components. A well-designed network brings them together โ€” safely! ๐Ÿš€

Series: Cloud Computing (24 articles)

  1. โ€ฆ
  2. 11
    ๐Ÿšจ Day 10/30: Cloud Networking โ€” The Internet Maze! ๐ŸŒ This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article