DevOpsLesson
DevOpsLesson

Free, comprehensive DevOps tutorials and learning roadmaps. Master Docker, Kubernetes, CI/CD, and more.

Stay Updated

Get notified about new tutorials and features.

Tutorials

  • What is DevOps?
  • Docker Tutorial
  • Terraform Tutorial
  • CI/CD Pipeline
  • All Tutorials

Roadmaps

  • DevOps Engineer
  • Cloud Engineer
  • SRE Path
  • All Roadmaps

Company

  • About Us
  • Blog
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 DevOpsLesson. All rights reserved.

DOCKERKUBERNETESTERRAFORMAWSCI/CDLINUXGITDEVOPS ROADMAPCLOUD ROADMAPSRE ROADMAPGIT CHEATSHEETDOCKER CHEATSHEETK8S CHEATSHEETTF CHEATSHEETLINUX CHEATSHEETDOCKERFILE LINTERYAML VALIDATORCRON PARSERREGEX TESTER

Aws Tutorial

Introduction to AWS
AWS Global Infrastructure
Setting Up AWS
AWS IAM
AWS EC2
AWS VPC
AWS S3
AWS RDS
AWS Lambda
AWS ECS and EKS
AWS CloudWatch
AWS CodePipeline
AWS Cost Optimization
AWS Elastic Load Balancing
AWS Auto Scaling
AWS CloudFront
AWS Route 53
AWS DynamoDB
AWS ElastiCache
AWS SQS
AWS SNS
AWS EventBridge
AWS Step Functions
AWS API Gateway
AWS ECR
AWS EKS
AWS CloudFormation
AWS Elastic Beanstalk
AWS KMS
AWS Secrets Manager
AWS WAF and Shield
AWS CloudTrail
AWS Config
AWS Systems Manager
AWS Organizations
AWS EFS
AWS EBS Deep Dive
AWS Kinesis
AWS Athena
AWS CodeDeploy
AWS CodeCommit
AWS CDK
AWS SAM

AWS VPC

PreviousPrev
Next

Learn how Amazon VPC creates isolated networking in AWS and how subnets, route tables, internet gateways, and NAT gateways shape connectivity.

Amazon VPC is the networking boundary for most AWS architectures. It gives you a private, logical network where you choose IP ranges, segment workloads into subnets, and control how traffic enters, leaves, and moves internally. For DevOps work, VPC knowledge matters because compute, databases, load balancers, and private service endpoints all depend on network design.

VPC Network Architecture

Internet
Internet Gateway
Public Subnet
10.0.1.0/24
↕ NAT Gateway
Private Subnet
10.0.11.0/24
No direct internet
Route Table
controls traffic flow

Private subnets use a NAT Gateway (in the public subnet) for outbound internet access

The first major split inside a VPC is usually public versus private subnets. A public subnet has a route to an Internet Gateway, which allows resources such as load balancers or bastion hosts to receive or send internet traffic directly. A private subnet does not expose instances directly to the internet. Instead, private workloads may reach external services through a NAT Gateway while remaining unreachable from inbound internet traffic.

ComponentPurposeTypical placement
Internet GatewayEnables internet routing for public resourcesAttached to the VPC
NAT GatewayOutbound internet access for private subnetsPublic subnet
Route tableDecides where traffic goesAssociated with one or more subnets
SubnetAZ-scoped IP range segmentPublic or private tier

Route tables are the traffic map. Every subnet is associated with a route table, and that table contains a default local route for traffic within the VPC. Public route tables often add 0.0.0.0/0 to the Internet Gateway. Private route tables often send 0.0.0.0/0 to a NAT Gateway. Small changes here can completely alter reachability, which is why networking mistakes are common when teams learn AWS.

Network isolation is not about making everything private for its own sake. It is about exposing only the parts of the system that must be reachable. A common pattern is public load balancers, private application servers, and private databases. That structure narrows attack surface while still allowing updates, package downloads, and outbound API calls.

Continue with AWS VPC Subnets, AWS VPC Route Tables, and AWS VPC NAT Gateway.

aws ec2 describe-vpcs --output table
aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-1234567890abcdef0 --output table
aws ec2 describe-route-tables --filters Name=vpc-id,Values=vpc-1234567890abcdef0 --output table

Operational note

When network troubleshooting gets confusing, reduce the problem to layers: subnet placement, route table association, security group rules, and the presence of the correct gateway or endpoint. AWS networking becomes much easier to reason about when you verify those four items in order instead of changing everything at once. Shared standards like this make future environments easier to launch, review, and support.

Exercise

Public and private subnets

What usually makes a subnet public in AWS?

Exercise

NAT Gateway usage

Why is a NAT Gateway commonly used?

PreviousPrev
Next

Continue Learning

AWS EC2 Instance Types

Understand EC2 instance family names and choose between general purpose, compute-optimized, memory-optimized, and specialized hardware.

10 min·Easy

AWS EC2 Security Groups

Use EC2 security groups as stateful firewalls by defining inbound and outbound rules based on ports, CIDR ranges, and other security groups.

12 min·Intermediate

AWS EC2 Key Pairs

Understand EC2 key pairs, how to create and use them with SSH, and what recovery options exist if a private key is lost.

8 min·Easy

Explore Related Topics

Te

Terraform Tutorials

Manage AWS infrastructure as code

Li

Linux Tutorials

Essential Linux skills for working with EC2

On This Page

Operational note