<?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: Supul Gintota</title>
    <description>The latest articles on DEV Community by Supul Gintota (@supul_gintota_4fbe1ec4ced).</description>
    <link>https://dev.to/supul_gintota_4fbe1ec4ced</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948548%2F296fdd56-83ff-49b6-8995-31da26fc1e2e.jpg</url>
      <title>DEV Community: Supul Gintota</title>
      <link>https://dev.to/supul_gintota_4fbe1ec4ced</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/supul_gintota_4fbe1ec4ced"/>
    <language>en</language>
    <item>
      <title>VCP-Virtual Private Cloud</title>
      <dc:creator>Supul Gintota</dc:creator>
      <pubDate>Tue, 26 May 2026 00:12:48 +0000</pubDate>
      <link>https://dev.to/supul_gintota_4fbe1ec4ced/vcp-virtual-private-cloud-5hbe</link>
      <guid>https://dev.to/supul_gintota_4fbe1ec4ced/vcp-virtual-private-cloud-5hbe</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhgejv11j4sbgglh2mfr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhgejv11j4sbgglh2mfr.png" alt=" " width="799" height="570"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1.1 What is the VPC&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In simple words, a &lt;strong&gt;VPC is your own private network inside AWS cloud&lt;/strong&gt;. You can place your servers, databases, and other cloud resources inside it and control how they communicate with the internet and with each other.&lt;/p&gt;

&lt;p&gt;Think of it like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Cloud = a big city&lt;br&gt;
Your VPC = your own private land/area inside that city&lt;/strong&gt;&lt;br&gt;
Inside that area, you decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which servers are public&lt;/li&gt;
&lt;li&gt;which servers are private&lt;/li&gt;
&lt;li&gt;who can access them&lt;/li&gt;
&lt;li&gt;how traffic goes in and out&lt;/li&gt;
&lt;li&gt;what security rules are applied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In your diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqux3tz84fnjajdtzeqn3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqux3tz84fnjajdtzeqn3.png" alt=" " width="799" height="434"&gt;&lt;/a&gt;&lt;br&gt;
Example:&lt;/p&gt;

&lt;p&gt;A user from the internet sends a request to your website.&lt;br&gt;
That request goes through the &lt;strong&gt;Internet Gateway&lt;/strong&gt; and reaches the Web Server in the Public Subnet.&lt;br&gt;
Then the web server can communicate with the Database in the Private Subnet.&lt;br&gt;
But the database is not directly open to the internet, so it is more secure.&lt;/p&gt;

&lt;p&gt;So, the main purpose of a VPC is to &lt;strong&gt;securely organize and control your cloud network&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  1.2 Core Component
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Subnet&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A subnet in a VPC is a smaller section of the VPC’s IP address range. There are three type of subnets&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Public Subnet
2. Private Subnet
3. Isolated Subnet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of a VPC as your private network in AWS, and subnets as smaller rooms/areas inside that network.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VPC CIDR: 10.0.0.0/16

Public Subnet:  10.0.1.0/24
Private Subnet: 10.0.2.0/24

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why do we use subnets?&lt;/p&gt;

&lt;p&gt;Subnets help you separate resources based on access level.&lt;/p&gt;

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

&lt;p&gt;A public subnet is connected to the internet through an Internet Gateway.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Web server&lt;/li&gt;
&lt;li&gt;EC2 instance that needs internet access&lt;/li&gt;
&lt;li&gt;Load balancer&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 is not directly accessible from the internet.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Database server&lt;/li&gt;
&lt;li&gt;Application backend&lt;/li&gt;
&lt;li&gt;Internal services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simple example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VPC
 ├── Public Subnet
 │    └── EC2 Web Server
 │         Accessible from internet using HTTP/HTTPS/SSH
 │
 └── Private Subnet
      └── Database Server
           Not directly accessible from internet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, in simple words:&lt;/p&gt;

&lt;p&gt;A subnet is a smaller network inside a VPC where you place AWS resources like EC2 servers, databases, and load balancers.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Internet Gateway (IGW)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;An Internet Gateway (IGW)&lt;/strong&gt; in Amazon Web Services is a component that allows your VPC (Virtual Private Cloud) to communicate with the internet.&lt;/p&gt;

&lt;p&gt;Think of it like a door between your AWS network and the public internet.&lt;/p&gt;

&lt;p&gt;Simple Explanation&lt;br&gt;
Without an Internet Gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EC2 Instance ❌ Internet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With an Internet Gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EC2 Instance ↔ Internet Gateway ↔ Internet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What It does&lt;/strong&gt;&lt;br&gt;
An Internet Gateway allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incoming internet traffic to your AWS resources&lt;/li&gt;
&lt;li&gt;Outgoing internet access from your instances&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3.Router Table&lt;/strong&gt;&lt;br&gt;
A Route Table in Amazon Web Services is a set of rules that tells your VPC where network traffic should go.&lt;/p&gt;

&lt;p&gt;Think of it like a GPS or traffic controller for your AWS network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Explanation&lt;/strong&gt;&lt;br&gt;
When data leaves an EC2 instance, the route table decides:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Where should I send this traffic?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To the internet&lt;/li&gt;
&lt;li&gt;To another subnet&lt;/li&gt;
&lt;li&gt;To a VPN&lt;/li&gt;
&lt;li&gt;To another VPC&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build a Custom VPC from Scratch
&lt;/h2&gt;

&lt;p&gt;Create&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;VPC&lt;/li&gt;
&lt;li&gt;Public Subnet&lt;/li&gt;
&lt;li&gt;Private Subnet&lt;/li&gt;
&lt;li&gt;Internet Gateway&lt;/li&gt;
&lt;li&gt;Route Tables&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 01 -  Create the VPC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the AWS Console search bar, type &lt;strong&gt;VPC&lt;/strong&gt; and click &lt;strong&gt;VPC&lt;/strong&gt; under Services.&lt;/li&gt;
&lt;li&gt;In the left sidebar, click &lt;strong&gt;Your VPCs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click the orange &lt;strong&gt;Create VPC&lt;/strong&gt; button (top right).&lt;/li&gt;
&lt;li&gt;Fill in the form:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Resources to create:&lt;/strong&gt; Select &lt;code&gt;VPC only&lt;/code&gt; (not "VPC and more" -- we will do it manually for learning)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;my-training-vpc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.0.0/16&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPv6 CIDR block:&lt;/strong&gt; &lt;code&gt;No IPv6 CIDR block&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tenancy:&lt;/strong&gt; &lt;code&gt;Default&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You should see a green success banner. Note the &lt;strong&gt;VPC ID&lt;/strong&gt; (e.g., &lt;code&gt;vpc-0abc1234...&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;STEP 2 - Create the Public Subnet&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the left sidebar, click &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VPC ID:&lt;/strong&gt; Select &lt;code&gt;my-training-vpc&lt;/code&gt; from the dropdown&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Subnet settings&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subnet name:&lt;/strong&gt; &lt;code&gt;my-public-subnet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability Zone:&lt;/strong&gt; Choose the first AZ in the list (e.g., &lt;code&gt;ap-south-1a&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.1.0/24&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Subnet created. Note the &lt;strong&gt;Subnet ID&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 3 - Create the Private Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Create subnet&lt;/strong&gt; again.&lt;/li&gt;
&lt;li&gt;Fill in:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;VPC ID:&lt;/strong&gt; Select &lt;code&gt;my-training-vpc&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Subnet settings&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Subnet name:&lt;/strong&gt; &lt;code&gt;my-private-subnet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability Zone:&lt;/strong&gt; You can use the same AZ or a different one (e.g., &lt;code&gt;ap-south-1b&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPv4 CIDR block:&lt;/strong&gt; &lt;code&gt;10.0.2.0/24&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create subnet&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Private subnet created.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 4 - Create and Attach an Internet Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the left sidebar, click &lt;strong&gt;Internet Gateways&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name tag:&lt;/strong&gt; &lt;code&gt;my-training-igw&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You will see the IGW is created but its &lt;strong&gt;State&lt;/strong&gt; shows &lt;code&gt;Detached&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Now attach it to your VPC:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;With the new IGW selected, click the &lt;strong&gt;Actions&lt;/strong&gt; button (top right).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Attach to VPC&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Available VPCs&lt;/strong&gt; dropdown, select &lt;code&gt;my-training-vpc&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Attach internet gateway&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The IGW State should now show &lt;code&gt;Attached&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 5 - Create a Public Route Table&lt;/strong&gt;&lt;br&gt;
AWS creates a &lt;strong&gt;Main route table&lt;/strong&gt; for every VPC automatically. Best practice is &lt;strong&gt;not to modify&lt;/strong&gt; the main route table (it applies to all subnets by default). Instead, we create a dedicated one for our public subnet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the left sidebar, click &lt;strong&gt;Route Tables&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;You will see an existing route table -- this is the &lt;strong&gt;main&lt;/strong&gt; one for &lt;code&gt;my-training-vpc&lt;/code&gt;. Notice it only has the local route (&lt;code&gt;10.0.0.0/16 -&amp;gt; local&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name:&lt;/strong&gt; &lt;code&gt;my-public-route-table&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; Select &lt;code&gt;my-training-vpc&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create route table&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;New route table created.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 6 - Add the Internet Route to the Public Route Table&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;code&gt;my-public-route-table&lt;/code&gt; to open its details.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Routes&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit routes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add route&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the new route:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Destination:&lt;/strong&gt; &lt;code&gt;0.0.0.0/0&lt;/code&gt; -- This means "all traffic going anywhere on the internet"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target:&lt;/strong&gt; Click the dropdown, select &lt;strong&gt;Internet Gateway&lt;/strong&gt;, then select &lt;code&gt;my-training-igw&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The Routes tab should now show two routes:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;10.0.0.0/16 -&amp;gt; local&lt;/code&gt; (VPC internal traffic)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;0.0.0.0/0 -&amp;gt; igw-xxxxxxxx&lt;/code&gt; (internet traffic)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 7 - Associate the Public Subnet with the Public Route Table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Adding a route to the route table is not enough -- we need to explicitly tell the public subnet to use this route table.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Still on the &lt;code&gt;my-public-route-table&lt;/code&gt; details page.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Subnet associations&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit subnet associations&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Check the box next to &lt;code&gt;my-public-subnet&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save associations&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The public subnet is now associated with the public route table.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;STEP 8 - Enable Auto-assign Public IP for the Public Subnet&lt;/strong&gt;&lt;br&gt;
When you launch an EC2 instance into the public subnet, it needs a public IP to be reachable from the internet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the left sidebar, click &lt;strong&gt;Subnets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;my-public-subnet&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Actions -&amp;gt; Edit subnet settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Auto-assign IP settings&lt;/strong&gt;, check &lt;strong&gt;Enable auto-assign public IPv4 address&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Done. Any EC2 instance launched into this subnet will automatically receive a public IP.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;VPC Summary - What We Built&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VPC: my-training-vpc (10.0.0.0/16)
|
|-- Public Subnet: my-public-subnet (10.0.1.0/24)
|       |
|       +-- Route Table: my-public-route-table
|               |-- 10.0.0.0/16 -&amp;gt; local
|               +-- 0.0.0.0/0  -&amp;gt; my-training-igw   [Internet access]
|
|-- Private Subnet: my-private-subnet (10.0.2.0/24)
|       |
|       +-- Route Table: Main (auto-created)
|               +-- 10.0.0.0/16 -&amp;gt; local             [No internet access]
|
+-- Internet Gateway: my-training-igw (Attached)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw08u8g1ej353ox9giykr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw08u8g1ej353ox9giykr.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Key Takeaways - Networking&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;VPC&lt;/strong&gt; is your private network inside AWS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subnets&lt;/strong&gt; are segments of that network, each scoped to one Availability Zone&lt;/li&gt;
&lt;li&gt;A subnet becomes &lt;strong&gt;public&lt;/strong&gt; only when it has a route to an Internet Gateway&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route tables&lt;/strong&gt; are the traffic directors -- each subnet has one&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Internet Gateway&lt;/strong&gt; is the single entry and exit point for internet traffic&lt;/li&gt;
&lt;li&gt;Best practice: databases go in &lt;strong&gt;private subnets&lt;/strong&gt;, web servers go in &lt;strong&gt;public subnets&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>ec2</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
