<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sachin Dasture</title>
    <description>The latest articles on DEV Community by Sachin Dasture (@sachin07).</description>
    <link>https://dev.to/sachin07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4282708%2F56da0874-2e0b-46c9-9ebd-478148ff7e1d.jpeg</url>
      <title>DEV Community: Sachin Dasture</title>
      <link>https://dev.to/sachin07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sachin07"/>
    <language>en</language>
    <item>
      <title>Amazon VPC Explained: Build Secure, Scalable, and Private Networks on AWS</title>
      <dc:creator>Sachin Dasture</dc:creator>
      <pubDate>Sat, 05 Dec 2026 11:04:26 +0000</pubDate>
      <link>https://dev.to/sachin07/amazon-vpc-explained-build-secure-scalable-and-private-networks-on-aws-4cbg</link>
      <guid>https://dev.to/sachin07/amazon-vpc-explained-build-secure-scalable-and-private-networks-on-aws-4cbg</guid>
      <description>&lt;h1&gt;
  
  
  Amazon VPC Explained: Build Secure, Scalable, and Private Networks on AWS
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When you deploy applications on AWS, one of the first things you need to understand is networking.&lt;/p&gt;

&lt;p&gt;Where will your application run? How will it communicate with other services? How can you control who accesses your resources?&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Amazon VPC (Virtual Private Cloud)&lt;/strong&gt; comes into the picture.&lt;/p&gt;

&lt;p&gt;Amazon VPC allows you to create your own logically isolated network inside AWS. You can control IP address ranges, create public and private subnets, configure routing, and manage network security.&lt;/p&gt;

&lt;p&gt;Whether you are deploying an EC2 instance, hosting a web application, building a Kubernetes cluster with Amazon EKS, or designing a production environment, understanding VPC is an essential AWS skill.&lt;/p&gt;

&lt;p&gt;Let's understand how it works and build a basic network using AWS CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What is Amazon VPC?
&lt;/h2&gt;

&lt;p&gt;Amazon Virtual Private Cloud (Amazon VPC) is a networking service that allows you to launch AWS resources in a logically isolated virtual network.&lt;/p&gt;

&lt;p&gt;Think of a VPC as your own private network in the AWS cloud.&lt;/p&gt;

&lt;p&gt;You decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which IP address range your network uses.&lt;/li&gt;
&lt;li&gt;How many subnets you need.&lt;/li&gt;
&lt;li&gt;Which resources are publicly accessible.&lt;/li&gt;
&lt;li&gt;How traffic moves between different networks.&lt;/li&gt;
&lt;li&gt;Which network connections are allowed or blocked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-world example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you are building an e-commerce application.&lt;/p&gt;

&lt;p&gt;You might have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Public subnet: Hosts the application load balancer.&lt;/li&gt;
&lt;li&gt;Private subnet: Hosts application servers.&lt;/li&gt;
&lt;li&gt;Database subnet: Hosts an Amazon RDS database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your database does not need direct internet access. Your application servers can communicate with it through private networking.&lt;/p&gt;

&lt;p&gt;This separation improves security and makes your architecture easier to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Important Components of Amazon VPC
&lt;/h2&gt;

&lt;p&gt;Let's understand the major components.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 VPC
&lt;/h3&gt;

&lt;p&gt;A VPC is the foundation of your AWS network.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC CIDR: 10.0.0.0/16&lt;/li&gt;
&lt;li&gt;Available IP addresses: 65,536 (including reserved address considerations).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can create a VPC through the AWS Management Console, AWS CLI, SDKs, or infrastructure-as-code tools such as Terraform.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Subnets
&lt;/h3&gt;

&lt;p&gt;A subnet is a smaller network created inside your VPC.&lt;/p&gt;

&lt;p&gt;You can divide your VPC into multiple subnets based on application requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A public subnet has a route to an Internet Gateway.&lt;/p&gt;

&lt;p&gt;Common use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application Load Balancers&lt;/li&gt;
&lt;li&gt;Public-facing web servers&lt;/li&gt;
&lt;li&gt;Bastion hosts, when required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Private Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A private subnet does not have a direct route to an Internet Gateway.&lt;/p&gt;

&lt;p&gt;Common use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application servers&lt;/li&gt;
&lt;li&gt;Backend services&lt;/li&gt;
&lt;li&gt;Databases&lt;/li&gt;
&lt;li&gt;Internal workloads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can create subnets in different Availability Zones to improve availability.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Internet Gateway (IGW)
&lt;/h3&gt;

&lt;p&gt;An Internet Gateway allows communication between resources in your VPC and the public internet when routing and security configurations permit it.&lt;/p&gt;

&lt;p&gt;For example, if you want an EC2 instance to serve a public website, you typically need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A subnet route to an Internet Gateway.&lt;/li&gt;
&lt;li&gt;A public IPv4 address or another suitable public connectivity mechanism.&lt;/li&gt;
&lt;li&gt;Appropriate security group rules.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember: attaching an Internet Gateway alone does not automatically make every EC2 instance publicly accessible.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.4 Route Tables
&lt;/h3&gt;

&lt;p&gt;A route table determines where network traffic is directed.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Destination&lt;/th&gt;
&lt;th&gt;Target&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;10.0.0.0/16&lt;/td&gt;
&lt;td&gt;Local&lt;/td&gt;
&lt;td&gt;Internal VPC traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0.0.0.0/0&lt;/td&gt;
&lt;td&gt;Internet Gateway&lt;/td&gt;
&lt;td&gt;Internet-bound IPv4 traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10.0.2.0/24&lt;/td&gt;
&lt;td&gt;Local routing&lt;/td&gt;
&lt;td&gt;VPC internal communication&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every subnet is associated with a route table, either explicitly or through the main route table.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.5 NAT Gateway
&lt;/h3&gt;

&lt;p&gt;A NAT Gateway allows resources in a private subnet to initiate connections to the internet without allowing unsolicited internet connections to reach those resources.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;An EC2 instance in a private subnet needs to download software updates.&lt;/p&gt;

&lt;p&gt;Instead of assigning it a public IP address, you can configure a route through a NAT Gateway.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.6 Security Groups
&lt;/h3&gt;

&lt;p&gt;Security Groups act as virtual firewalls for AWS resources.&lt;/p&gt;

&lt;p&gt;They control inbound and outbound traffic.&lt;/p&gt;

&lt;p&gt;Important points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security groups are stateful.&lt;/li&gt;
&lt;li&gt;They support allow rules.&lt;/li&gt;
&lt;li&gt;They are associated with network interfaces and resources.&lt;/li&gt;
&lt;li&gt;Return traffic for allowed connections is automatically permitted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Allow HTTP traffic on port 80 and HTTPS traffic on port 443 for a public web server.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.7 Network ACLs (NACLs)
&lt;/h3&gt;

&lt;p&gt;Network ACLs provide an additional security layer at the subnet level.&lt;/p&gt;

&lt;p&gt;Important points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NACLs are stateless.&lt;/li&gt;
&lt;li&gt;They support allow and deny rules.&lt;/li&gt;
&lt;li&gt;They evaluate rules in numerical order.&lt;/li&gt;
&lt;li&gt;Both inbound and outbound rules must be considered.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. How Amazon VPC Architecture Works
&lt;/h2&gt;

&lt;p&gt;Let's consider a simple three-tier application architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Internet Users → Internet Gateway → Public Subnet → Application Layer → Private Subnet → Database Layer&lt;/p&gt;

&lt;p&gt;A typical production design may include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A VPC with CIDR 10.0.0.0/16.&lt;/li&gt;
&lt;li&gt;Public subnets in multiple Availability Zones.&lt;/li&gt;
&lt;li&gt;Private application subnets.&lt;/li&gt;
&lt;li&gt;Isolated database subnets.&lt;/li&gt;
&lt;li&gt;Internet Gateway for public connectivity.&lt;/li&gt;
&lt;li&gt;NAT Gateway for private outbound internet access.&lt;/li&gt;
&lt;li&gt;Security Groups and NACLs for network protection.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is to expose only the components that need public access.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Hands-on: Create an Amazon VPC Using AWS CLI
&lt;/h2&gt;

&lt;p&gt;Now let's create a basic VPC using AWS CLI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before starting, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account.&lt;/li&gt;
&lt;li&gt;AWS CLI installed.&lt;/li&gt;
&lt;li&gt;Configured AWS credentials.&lt;/li&gt;
&lt;li&gt;Appropriate IAM permissions.&lt;/li&gt;
&lt;li&gt;A selected AWS Region.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Verify your AWS CLI configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check your AWS Region:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure get region
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this example, we will use:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;CIDR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VPC&lt;/td&gt;
&lt;td&gt;10.0.0.0/16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Public Subnet&lt;/td&gt;
&lt;td&gt;10.0.1.0/24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private Subnet&lt;/td&gt;
&lt;td&gt;10.0.2.0/24&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Use an appropriate Availability Zone in your selected Region.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Create a VPC
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;VPC_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;aws ec2 create-vpc \
  --cidr-block 10.0.0.0/16 \
  --query &lt;span class="s1"&gt;'Vpc.VpcId'&lt;/span&gt; \
  --output text&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable DNS support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 modify-vpc-attribute \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --enable-dns-support &lt;span class="nv"&gt;Value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable DNS hostnames:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 modify-vpc-attribute \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --enable-dns-hostnames &lt;span class="nv"&gt;Value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Create a Public Subnet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;AZ&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"YOUR_AVAILABILITY_ZONE"&lt;/span&gt;

&lt;span class="nv"&gt;PUBLIC_SUBNET_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;aws ec2 create-subnet \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --cidr-block 10.0.1.0/24 \
  --availability-zone &lt;span class="s2"&gt;"$AZ"&lt;/span&gt; \
  --query &lt;span class="s1"&gt;'Subnet.SubnetId'&lt;/span&gt; \
  --output text&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$PUBLIC_SUBNET_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable automatic public IPv4 assignment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 modify-subnet-attribute \
  --subnet-id &lt;span class="s2"&gt;"$PUBLIC_SUBNET_ID"&lt;/span&gt; \
  --map-public-ip-on-launch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Create a Private Subnet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;PRIVATE_SUBNET_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;aws ec2 create-subnet \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --cidr-block 10.0.2.0/24 \
  --availability-zone &lt;span class="s2"&gt;"$AZ"&lt;/span&gt; \
  --query &lt;span class="s1"&gt;'Subnet.SubnetId'&lt;/span&gt; \
  --output text&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$PRIVATE_SUBNET_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Create and Attach an Internet Gateway
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;IGW_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;aws ec2 create-internet-gateway \
  --query &lt;span class="s1"&gt;'InternetGateway.InternetGatewayId'&lt;/span&gt; \
  --output text&lt;span class="o"&gt;)&lt;/span&gt;

aws ec2 attach-internet-gateway \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --internet-gateway-id &lt;span class="s2"&gt;"$IGW_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Create a Public Route Table
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;PUBLIC_RT_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;aws ec2 create-route-table \
  --vpc-id &lt;span class="s2"&gt;"$VPC_ID"&lt;/span&gt; \
  --query &lt;span class="s1"&gt;'RouteTable.RouteTableId'&lt;/span&gt; \
  --output text&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a default internet route:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 create-route \
  --route-table-id &lt;span class="s2"&gt;"$PUBLIC_RT_ID"&lt;/span&gt; \
  --destination-cidr-block 0.0.0.0/0 \
  --gateway-id &lt;span class="s2"&gt;"$IGW_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Associate the route table with the public subnet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 associate-route-table \
  --route-table-id &lt;span class="s2"&gt;"$PUBLIC_RT_ID"&lt;/span&gt; \
  --subnet-id &lt;span class="s2"&gt;"$PUBLIC_SUBNET_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your public subnet now has a route to the internet. Actual connectivity still depends on public addressing and security configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Verify Your VPC
&lt;/h3&gt;

&lt;p&gt;List your VPCs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 describe-vpcs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List your subnets:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 describe-subnets \
  --filters &lt;span class="s2"&gt;"Name=vpc-id,Values=$VPC_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;List your route tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 describe-route-tables \
  --filters &lt;span class="s2"&gt;"Name=vpc-id,Values=$VPC_ID"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! You have created a basic AWS network with public and private subnets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is a learning environment, not a complete production deployment. The private subnet has no NAT Gateway or VPC endpoint configured in this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Public Subnet vs Private Subnet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Public Subnet&lt;/th&gt;
&lt;th&gt;Private Subnet&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Internet Gateway route&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No direct route&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Public IP&lt;/td&gt;
&lt;td&gt;Can be assigned&lt;/td&gt;
&lt;td&gt;Usually not assigned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internet access&lt;/td&gt;
&lt;td&gt;Possible&lt;/td&gt;
&lt;td&gt;Through NAT or endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical resources&lt;/td&gt;
&lt;td&gt;Load balancers&lt;/td&gt;
&lt;td&gt;App servers and databases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security&lt;/td&gt;
&lt;td&gt;Controlled by security rules&lt;/td&gt;
&lt;td&gt;Controlled by security rules&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  6. Security Groups vs Network ACLs
&lt;/h2&gt;

&lt;p&gt;Both help protect your AWS network, but they work differently.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Security Group&lt;/th&gt;
&lt;th&gt;Network ACL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Level&lt;/td&gt;
&lt;td&gt;Resource/network interface&lt;/td&gt;
&lt;td&gt;Subnet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stateful&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rules&lt;/td&gt;
&lt;td&gt;Allow only&lt;/td&gt;
&lt;td&gt;Allow and deny&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rule evaluation&lt;/td&gt;
&lt;td&gt;All applicable rules&lt;/td&gt;
&lt;td&gt;Numbered order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Default behavior&lt;/td&gt;
&lt;td&gt;Deny inbound, allow outbound by default&lt;/td&gt;
&lt;td&gt;Default NACL allows all traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A good approach is to use Security Groups as your primary resource-level security control and NACLs as an additional subnet-level security layer where needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. AWS VPC Security Best Practices
&lt;/h2&gt;

&lt;p&gt;Security should be considered from the beginning of your network design.&lt;/p&gt;

&lt;p&gt;Here are some important practices:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Follow Least Privilege&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Allow only the required traffic and ports. Avoid opening unnecessary inbound connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Keep Databases Private&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Never expose database servers directly to the public internet. Use private subnets and restrict database access to authorized application resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Restrict SSH and RDP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Avoid allowing SSH (port 22) or RDP (port 3389) from 0.0.0.0/0. Use Systems Manager Session Manager or restricted trusted source addresses where appropriate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Use Multiple Availability Zones&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Deploy critical workloads across multiple Availability Zones to improve resilience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Enable VPC Flow Logs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;VPC Flow Logs help capture information about IP traffic going to and from network interfaces in your VPC. They are useful for monitoring and troubleshooting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Use VPC Endpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;VPC Endpoints allow private connectivity to supported AWS services without requiring traffic to travel through the public internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Monitor Network Activity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use Amazon CloudWatch and other AWS monitoring services to observe network behavior and investigate unexpected traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Use Infrastructure as Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use Terraform or AWS CloudFormation to create and manage repeatable VPC configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where Is Amazon VPC Used in Real Projects?
&lt;/h2&gt;

&lt;p&gt;Amazon VPC is used in many cloud infrastructure scenarios.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;How VPC Helps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Web Applications&lt;/td&gt;
&lt;td&gt;Separates public and backend resources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Microservices&lt;/td&gt;
&lt;td&gt;Provides controlled private communication&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon EKS&lt;/td&gt;
&lt;td&gt;Supports Kubernetes networking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database Hosting&lt;/td&gt;
&lt;td&gt;Keeps databases in private networks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid Cloud&lt;/td&gt;
&lt;td&gt;Connects AWS with on-premises networks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DevOps Infrastructure&lt;/td&gt;
&lt;td&gt;Supports secure CI/CD and deployment environments&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For DevOps engineers, VPC knowledge is particularly important when deploying EC2 instances, configuring load balancers, creating Kubernetes clusters, and building production infrastructure using Terraform.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Let's quickly revise what we learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon VPC provides an isolated virtual network inside AWS.&lt;/li&gt;
&lt;li&gt;Subnets divide your VPC into smaller networks.&lt;/li&gt;
&lt;li&gt;Internet Gateways provide internet connectivity for appropriately configured public resources.&lt;/li&gt;
&lt;li&gt;NAT Gateways allow private resources to initiate outbound internet connections.&lt;/li&gt;
&lt;li&gt;Route Tables control network traffic destinations.&lt;/li&gt;
&lt;li&gt;Security Groups protect resources.&lt;/li&gt;
&lt;li&gt;Network ACLs provide subnet-level traffic filtering.&lt;/li&gt;
&lt;li&gt;VPC Endpoints provide private access to supported AWS services.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Amazon VPC is one of the most important building blocks of AWS infrastructure.&lt;/p&gt;

&lt;p&gt;Understanding VPC, subnets, routing, gateways, and security controls helps you design cloud environments that are secure, scalable, and reliable.&lt;/p&gt;

&lt;p&gt;If you are learning AWS or preparing for a Cloud Engineer or DevOps Engineer role, don't just memorize the concepts. Create your own VPC, launch resources, configure routes, test connectivity, and understand how traffic flows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your next step:&lt;/strong&gt; Try recreating this architecture using Terraform and deploy a simple web application on EC2.&lt;/p&gt;

&lt;p&gt;Keep building, keep learning, and keep exploring AWS!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Let's Connect and Learn Together!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Have you built your own VPC architecture? Share your experience, questions, or useful tips in the comments.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>infrastructure</category>
      <category>networking</category>
    </item>
  </channel>
</rss>
