Mastering AWS VPC: A Complete Guide to VPC Introduction, Components, and Step-by-Step Hands-On Demo

What is Aws Vpc?                                         It was one of the main services in AWS. We can launch our AWS resources in a logica...

What is Aws Vpc?
                                It was one of the main services in AWS. We can launch our AWS resources in a logically isolated virtual network that we define, we can use both ipv4 and ipv6.

VPC Components:
                                VPC has four main components.
1.  Subnet.
2.  Internet Gateway(IGW)(Ipv4).
3.  Egress only Internet Gateway(EOIG) (Ipv6).
4.  RouteTable

          In AWS, a subnet is a range of IP addresses in your VPC (Virtual Private Cloud) that can be used to deploy your resources such as EC2 instances, RDS databases, and other services.
           Subnets are used to divide a VPC into smaller networks to control the flow of traffic and improve security. Each subnet has its own route table, security groups, and network access control lists (ACLs) that define how traffic is allowed to flow in and out of the subnet.
            When creating a VPC in AWS, you must define at least one subnet for each Availability Zone (AZ) in which you want to deploy resources. Each subnet is associated with a specific AZ and can only be used for resources that are deployed in that AZ.
            AWS provides two types of subnets - public and private subnets.
            Public subnets have a direct route to the Internet using the Internet Gateway(IGW), while private subnets do not. Resources deployed in a private subnet can still access the internet, but only through a NAT (Network Address Translation) gateway or instance.

Internet Gateway(IGW)(Ipv4):
            In AWS, an IGW (Internet Gateway) is a horizontally scaled, redundant, and highly available VPC component that allows your resources within a VPC to connect to the internet.
            An IGW serves as a gateway between your VPC and the public internet. It enables the communication between resources in your VPC and the internet, allowing you to access the internet and also receive incoming traffic from the internet.
            An IGW is a logical entity that is attached to your VPC and provides a target for internet-routable traffic destined for your VPC subnets. It enables the communication between resources in your VPC and the public internet while ensuring that inbound traffic is only allowed if it is explicitly allowed by the security groups and network ACLs associated with your resources.
            An IGW is required if you want to access the internet from your VPC or if you want to allow the internet to access resources in your VPC. You can attach an IGW to your VPC and configure the route tables to route traffic to and from the IGW.
            It's important to note that an IGW is only used for communication with the public internet, and it does not provide a secure connection. For secure communication, you should use other AWS services like VPN, Direct Connect, or HTTPS.

Egress Only Internet Gateway (EOIG):
            An Egress Only Internet Gateway is an AWS VPC component that allows outbound communication from your VPC to the Internet over IPv6 while blocking incoming traffic from the Internet. It is used to maintain the security of your VPC while still allowing communication to and from the internet.

 Route Table is a virtual table in an AWS VPC that contains a set of rules or routes that determine how traffic flows within the VPC, including traffic between subnets, between your VPC and remote networks, and between your VPC and the internet.
                Each subnet within a VPC must be associated with a route table, and the routes in a route table specify the destination CIDR block and the target of the traffic.


VPC Creation:             Login into the AWS console and search for the Service called VPC.
In the VPC Dashboard click Create VPC option to Create the VPC.

Inside the VPC creation step, we have two options
Option1: Just create the VPC 
Option2: Create the VPC and subnets

Inside the VPC creation step, we need to give the name of the vpc and add the IPV4 address with CIDR and click create VPC option. If you want to create the VPC for IPV6 you can choose any one option.
If you want to create the VPC and vpc components like subnet, route table, Internet gateway, NATgateway and VPC endpoint click VPC and more options.

If you already created the Vpc and Vpc components using VPC and more options skip the below steps.

2. Subnet Creation:       Once the Vpc was created we need to create the subnet, for that click the Subnet option in the VPC dashboard and click create subnet on the top of the Subnet dashboard.

In the subnet creation step, we need to choose the Vpc to which this subnet belongs too,  we need to give the name for the subnet and add the network address with CidR, need to choose any availability zone or you can choose no preference so that it will create a subnet in any availability zone.
If you want to create another subnet within this same configuration page click add new subnet and add the same details for the subnet2,3 as well.
Before creating the subnet2 and subnet3 you need to understand the CIDR and the network and host values for CIDR
Ex: – it ranges from -, Total of 65,536 host addresses.
If you are struggling to calculate the subnets use below the online subnet calculator to calculate the subnet ranges using CIDR,

3. IGW Creation:
        In the VPC Dashboard need to click the IGW( internet gateway option ) and click Create IGW inside the configuration page give the name and create the IGW. Once created the IGW needs to attach the IGW to the VPC, One IGW for One Vpc.

Once the IGW is created, Now you can create the Route table.

4. RouteTable creation:
If you click the Routetable in the VPC Dashboard by default you can able to find the route table one for the default VPC and custom-created VPC.
        We can use the Default route table for custom-vpc or you can create a route table for each subnet.

In the Route table creation step, we need to type the name of the route table and choose the VPC.

After creating the route table you need to associate the IGW(internet gateway) and associate the subnet. In the RouteTable you can able to find the option called Routes, In the routes we need to add IGW for Public subnets, if you are creating the route table for private subnets no need to add IGW.

Vpc was already associated with the route table, so we need to associate the IGW
For associating IGW click to add a route and in the destination place, type in the target option browse the internet gateway option and choose the existing internet gateway for your customized VPC(techiev)and click save changes.

once the Internet gateway is associated we need to associate the subnet.
To associate the subnet click subnet associations in the Routetable options and click edit subnet associations add the subnet which you want to associate with this route table.

Now we can able to use this VPC, Subnet, and Routetable for EC2 public Instances. 

If You are new to creating the EC2 Instance, click below link to check our Blog

----------------------------------------!!!! Happy Learning with Techiev !!!!!!!!----------------------------------

-------------------------Subscribe our Youtube Channel by clicking the below link---------------------- ----------------------------!!!!---------------------


Techie View: Mastering AWS VPC: A Complete Guide to VPC Introduction, Components, and Step-by-Step Hands-On Demo
Mastering AWS VPC: A Complete Guide to VPC Introduction, Components, and Step-by-Step Hands-On Demo
Techie View
Loaded All Posts Not found any posts VIEW ALL View Full Article Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy