Skip to content
Learn Netverks

Lesson

Step 21/36 58% through track

vpc-basics

VPC basics

Last reviewed May 28, 2026 Content v20260528
Track mode
none
Means
Read / quiz
Reading
~2 min
Level
beginner

This lesson

This lesson teaches VPC basics: AWS concepts, console/CLI practice patterns, and how the service fits in a typical cloud architecture.

Network segmentation limits blast radius when credentials leak—default VPC habits are interview and audit fodder.

You will apply VPC basics in contexts like: Three-tier web apps, private subnets for databases, and hybrid connectivity.

Read the lesson, reproduce steps in your AWS Free Tier or sandbox (console and optional AWS CLI), diagram the architecture in notes, and complete MCQs—no in-browser cloud lab.

When you can explain the previous lesson's ideas in your own words.

A Virtual Private Cloud (VPC) is your isolated network in AWS. You define IP ranges, subnets, route tables, and gateways so resources communicate securely.

VPC building blocks

  • CIDR block — e.g. 10.0.0.0/16 private IP space
  • Subnet — segment in one AZ (10.0.1.0/24 public, 10.0.2.0/24 private)
  • Internet Gateway (IGW) — public subnet internet access
  • NAT Gateway — outbound internet for private subnets (costs money—tear down in sandbox)
  • Route table — directs traffic (0.0.0.0/0 → IGW or NAT)

Default VPC

New accounts often have a default VPC with public subnets per AZ—fine for learning; production designs use explicit private subnets for app and database tiers.

Describe your VPCs

aws ec2 describe-vpcs \
  --query 'Vpcs[].{Id:VpcId,Cidr:CidrBlock,IsDefault:IsDefault}' \
  --output table
aws ec2 describe-subnets \
  --query 'Subnets[].{Id:SubnetId,CIDR:CidrBlock,AZ:AvailabilityZone}' \
  --output table

Practice: Create S3 buckets and VPC resources only in a sandbox account. Use unique bucket names globally; delete buckets and empty objects when finished.

Important interview questions and answers

  1. Q: Public vs private subnet?
    A: Public routes to IGW for direct inbound internet; private uses NAT for outbound-only or internal traffic.
  2. Q: Why place RDS in private subnet?
    A: Database not directly reachable from internet—app tier connects internally.

Self-check

  1. What does a route table do?
  2. Why use private subnets for application backends?

Tip: Three-tier pattern: public subnets for ALB, private for apps, private for RDS.

Interview prep

Private subnet?

No direct inbound internet route—often hosts app and database tiers.

Route table?

Directs subnet traffic to IGW, NAT gateway, or internal targets.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Public vs private subnet?
  • RDS placement?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump