YouTube transcript (P8g7Z4NYk3Q) — Transcript
Full transcript
- 0:01hello everyone my name is Abhishek and
- 0:04welcome back to my channel and also
- 0:06welcome to one more episode of AWS 020
- 0:09Series in this video I'll Deep dive
- 0:11through one of the most complicated
- 0:13topics of AWS that is virtual private
- 0:16Cloud also known as VPC
- 0:19so today's class let's learn what is
- 0:22virtual private Cloud let's understand
- 0:24why you need virtual private Cloud what
- 0:27are the different components of virtual
- 0:29private cloud and also how do they
- 0:31interact with each other
- 0:33and finally
- 0:35there is a fear amongst a lot of people
- 0:37that virtual private cloud is a
- 0:39difficult topic you might say that yes
- 0:41Abhishek we have that concern because
- 0:44VPC involves a lot of networking there
- 0:47are multiple components and it's
- 0:48difficult to understand why and how each
- 0:50of these component is interacting what
- 0:52purposeful they're solving so don't
- 0:54worry if you have any such fear or even
- 0:56if you are completely new to networking
- 0:58and VPC after today's video you along
- 1:01with me will say that virtual private
- 1:04cloud is an easy concept and I
- 1:06understand this concept end to end so we
- 1:09will do practicals as well but practical
- 1:11will not be part of today's video
- 1:12because it is very very important to
- 1:16have strong foundational knowledge on
- 1:18VPC so today's video I will try to add
- 1:21that foundational knowledge on VPC for
- 1:24you and in tomorrow's video we will Deep
- 1:26dive into slightly more complicated
- 1:28topic of VPC that is related to security
- 1:30and in day after video we will try to do
- 1:33a practical video deploy application
- 1:35inside VPC and explore the complete flow
- 1:37of VPC so that will be the entire thing
- 1:40but how will I make this concept easy
- 1:42for you you might ask me what I do is I
- 1:45will take a real life scenario okay so
- 1:48we will take a very much real life
- 1:49scenario that all of us understand and
- 1:52we will use the same real life scenario
- 1:54to understand the concept of VPC so this
- 1:57real life scenario has nothing to do
- 1:59with AWS but still I will correlate and
- 2:01make this concept very very easy for you
- 2:03in the lines of AWS
- 2:06so let's quickly start the video and
- 2:08understand virtual private cloud
- 2:11so to start with the example the
- 2:13scenario that I was talking about let's
- 2:14say that there is a huge land okay so
- 2:18let's call this as a village okay so we
- 2:21have a village and there are a lot of
- 2:23people in this Village but there are
- 2:24specific set of lazy people in this
- 2:26Village okay so these lazy people are
- 2:30lazy enough that they can't construct
- 2:33their own houses
- 2:34why they can't construct their own
- 2:36houses because they don't want to
- 2:38maintain their houses they don't want to
- 2:40manage their houses and also they don't
- 2:42want to go through all the construction
- 2:43process and everything related to their
- 2:45houses so these people they are actually
- 2:49looking for some people and at the same
- 2:52time there is one wise person in this
- 2:54Village okay let's say that this wise
- 2:57person is called ABC so there is a wise
- 3:00person called ABC in the village what he
- 3:03has done is he saw this opportunity of
- 3:05lazy people and he said that okay let me
- 3:07grab this opportunity and make money out
- 3:09of it so this wise person ABC what he
- 3:12has done is he's went to this Village
- 3:15and he acquired a huge land in this
- 3:17Village
- 3:18okay so you acquired this entire land in
- 3:21this Village and he said that okay hey
- 3:23lazy people what I'm going to do is I am
- 3:26going to construct the houses for you
- 3:27but for that you have to send me a
- 3:30request with your entire requirements
- 3:32like what are the resources that you
- 3:33require in this house what is the
- 3:35capacity uh that you require in this
- 3:37house and fill me all the details and
- 3:39give it to me and in return I give you
- 3:42house and I'll take money from you right
- 3:44so this person has started the process
- 3:47and what this ABC or the vice person has
- 3:50done is he has constructed this house in
- 3:53the land that he has acquired so he
- 3:55purchased this entire land and he uh
- 3:57constructed a house and he said that
- 3:59I'll maintain this house for you
- 4:01so this person felt happy for it and
- 4:03then seeing this other person also
- 4:05approached and he has constructed house
- 4:06for the other person as well so in
- 4:08future there is one more person and he
- 4:10has constructed house for that one more
- 4:12person so it is going well and all of
- 4:15these people their problem is solved
- 4:16that uh they don't want to maintain the
- 4:18entire construction and maintenance this
- 4:21person the wise person ABC is taking
- 4:23care of it and they are all happy but
- 4:25there are other bunch of people what
- 4:27they have done is they saw this they
- 4:29were happy about it but they realized
- 4:31that these bunch of people they have
- 4:33realized that there is some kind of
- 4:35security issue here there is some kind
- 4:36of privacy Beach that means
- 4:39for the purpose of saving a lot of money
- 4:42what this person has done is he has
- 4:43constructed the houses but they are very
- 4:45nearby and there is some kind of
- 4:47security breach that anyone who access
- 4:49this house can has can hack uh hack or
- 4:52access the other house and can also
- 4:54access the other house so that way there
- 4:56is some kind of security breach that is
- 4:58happening here so these people said that
- 4:59okay we are also looking for houses from
- 5:01you but we want it in a much better way
- 5:04not in this way where if one of these
- 5:06houses compromised that the other houses
- 5:08are also compromised so this person
- 5:10to not to lose the business and you know
- 5:13because he want to construct more and
- 5:15more uh these things what he said is
- 5:17okay give me some time and he came back
- 5:19with A New Concept called secure land
- 5:22okay so what he said is okay I have this
- 5:25entire property but if you come as a
- 5:28group where if you want a group housing
- 5:30or something what I can do is I can
- 5:33build a secure
- 5:34property for you people
- 5:36so inside this entire land what this
- 5:40person ABC has done is he has built a
- 5:42secure property for these people and
- 5:44this security property what he said is
- 5:46only people who have access to the
- 5:50secure property like he said that I'll
- 5:51construct a gate here which will act as
- 5:53a Gateway right so this gate will act as
- 5:55a Gateway and only these people or the
- 5:58people's relatives or people who know
- 6:01these people only can enter this secure
- 6:03property right so what happens is let's
- 6:06say someone wants to meet this person
- 6:07okay and this person has one property
- 6:10here the other person this person has
- 6:13one property here and this person has a
- 6:15property here
- 6:16right so now there is one of the
- 6:19relatives of this person right let's
- 6:20call this person as a now the reality of
- 6:23a wants to meet this person so what the
- 6:27secure property does is this person can
- 6:30definitely meet him but he first has to
- 6:33pass through this gate so there can be a
- 6:34security guard or someone who will guard
- 6:36this property and once he enters this so
- 6:39this is a property that all of these
- 6:41people own right so the secure property
- 6:43this is all the public thing where
- 6:45everybody owns this but if this person
- 6:47this XYZ person let's say he wants to go
- 6:51and meet this person called a now he
- 6:53need to understand how to go to this
- 6:55property right now because I am drawing
- 6:57this picture you know how to go from
- 6:58here to here but eventually to go from
- 7:01here to here there has to be another
- 7:02guide here so this guide basically
- 7:05explains okay move from here to here and
- 7:07finally you will reach the person a
- 7:09again once you reach this person a there
- 7:12will be another security guard or there
- 7:14will be some kind of person here who
- 7:16will validate okay is this the right
- 7:18person you entered the Gateway you moved
- 7:21into the secure property but again do
- 7:22you want to meet a do you want to meet B
- 7:24do you want to meet C so if you are a
- 7:26valid person who wants to meet a then
- 7:28only I will accept your request to purse
- 7:31meet the person a so this way what this
- 7:35ABC the wise person has done is he has
- 7:38solved the problem of security breach
- 7:40and solve the problem of security and
- 7:42now everybody is enjoying the secure
- 7:44property looking at these people there
- 7:47are another bunch of people who came to
- 7:49him and he has built another secure
- 7:50property another secure property another
- 7:53secure property this way he started
- 7:55making his business now why did I
- 7:57explain this story to you people you
- 7:59might be thinking has Abhishek gone mad
- 8:01why is he saying all of these things and
- 8:03how we
- 8:05how is it going to be related to AWS
- 8:07okay now let's try to relate the same
- 8:10thing to AWS in the last class I showed
- 8:12you how to create an ec2 instance how to
- 8:14deploy an application and how to access
- 8:16that application right so now
- 8:19let's go to the same scenario where
- 8:22there is this big
- 8:24region okay so let's call this region as
- 8:28Mumbai or Ohio or whatever you would
- 8:30like to what happened was there are
- 8:33people okay so there are companies let's
- 8:36say this company as example.com this
- 8:39company has example1.com then there is
- 8:41another company called example2.com so
- 8:44these people initially they were
- 8:46maintaining their own data centers but
- 8:47it was becoming too hectic for them so
- 8:50they said that okay uh if there is
- 8:51someone who is going to help us with
- 8:53this data center we'll off-board that to
- 8:55them or there is a new startup now they
- 8:58said that okay we can't afford to build
- 8:59a new data center we can't afford to
- 9:01maintain it now we are also looking for
- 9:03someone so AWS saw this opportunity
- 9:05right so in this case who is the vice
- 9:08person AWS is the vice person what AWS
- 9:11said is hey okay what I can do is inside
- 9:15this region let's say there is region
- 9:16called Mumbai or Ohio or throughout the
- 9:18world what AWS did is AWS started
- 9:21building their own data centers
- 9:24in the previous example that person has
- 9:26acquired a lot of land right the wise
- 9:28person here what AWS did is AWS started
- 9:31purchasing or building their own data
- 9:33center so AWS built this entire data
- 9:35center in Mumbai region for example or
- 9:37Ohio region or Frankfurt anywhere AWS
- 9:41started building their own data centers
- 9:43now what AWS said is
- 9:46hey lazy companies or hey startup hey
- 9:50example one example two example three so
- 9:52we can
- 9:53host your applications inside our data
- 9:56centers or you can request us saying
- 9:58that hey I want one virtual machine I
- 10:00want 10 virtual machines I want 20
- 10:01virtual machines and we will take your
- 10:03request you give me money and I will
- 10:05create the instances for you so this was
- 10:07going by uh I mean this exact same thing
- 10:10what we did uh previously and this was
- 10:12going very fine where example.com one uh
- 10:16they requested and what AWS did so this
- 10:19is the story of 2013 2014. okay so
- 10:22during this time what AWS did is if
- 10:24example.com is requesting it uh 10 ec2
- 10:28instances so it went to the data center
- 10:31in region Mumbai or whichever region it
- 10:33requested and it created 10 ec2
- 10:35instances okay so again inside the data
- 10:38centers there will be multiple physical
- 10:40servers let's say this is a physical
- 10:41server and example.com requested two ec2
- 10:44instances so it gave two ec2 instances
- 10:45inside This Server let's call it server
- 10:48one
- 10:49so then there is example two and what
- 10:52AWS did is it created again
- 10:55request of example 2 in the server one
- 10:58only then there is example three and
- 11:00what AWS did is again it went to here
- 11:03and it created server let's say it
- 11:05requested for one server it created in
- 11:07server one only here what I'm talking
- 11:08about virtual machine one what's the two
- 11:10virtual machines and two virtual
- 11:12machines so this is fine all of this
- 11:15problem is solved and AWS is also giving
- 11:17them virtual machines inside the data
- 11:19center inside data center like I told
- 11:20you there can be multiple servers for
- 11:22one server AWS choose one server and
- 11:24solved all of their problem
- 11:26but what happened is let's say so this
- 11:29is a theory what happened what can
- 11:31happen is that in this case so if there
- 11:33is a hacker and let's say this is
- 11:35startup okay let's say this is startup
- 11:37if there is a hacker here because they
- 11:38were not maintaining proper security he
- 11:40entered into this server he tried to
- 11:42make some false requests to this
- 11:44application inside uh the physical
- 11:46virtual machine and he was able to hack
- 11:49this particular server now because all
- 11:52of them are in the same physical server
- 11:54inside the AWS data center hacker can
- 11:56easily come here hacker can easily come
- 11:58here hacker can easily come here and he
- 12:01can hack the entire thing right so just
- 12:04because of example three or just because
- 12:07of startup what happened is all of the
- 12:10servers are hacked because AWS was
- 12:12creating entire instances or AWS was
- 12:15creating all the things in same things
- 12:17or it can also create in different
- 12:18things but what happens if it creates in
- 12:20the same server right so till 2013 2014
- 12:23this was happening so to solve this
- 12:25problem like I told you even in the
- 12:27previous example to solve the security
- 12:29breach what AWS said is okay we will
- 12:31come up with a new Concept in that case
- 12:33it was Secure community in AWS terms it
- 12:36is called as VPC right so what aw said
- 12:40is we will build a VPC for you or
- 12:44in the other way around like in the
- 12:46previous case the Builder will build the
- 12:47entire secure community and give it to
- 12:49you but in the AWS terms AWS will give
- 12:52you a documentation AWS will give you
- 12:54examples who is the one who builds this
- 12:56entire VPC and maintains the VPC it is
- 12:58devops or AWS devops Engineers okay so
- 13:02AWS devops engineer looking at the
- 13:04documentation of AWS they will go to the
- 13:06AWS portal and they will request for the
- 13:08VPC and they will configure everything
- 13:10inside the VPC now let's see what is
- 13:12inside the VPC using the same example
- 13:14itself in the same example what I told
- 13:16you I'll try to convert that into AWS
- 13:19example right so this is AWS Data Center
- 13:24again so there is let's take example of
- 13:28one company here so let's say there is
- 13:30TCS and inside TCS there is one project
- 13:35and this project is owned by a devops
- 13:37engineer so what this devops engineer
- 13:39does is he will go to AWS and let's say
- 13:42there is a region called Mumbai he'll go
- 13:45to AWS and say hey AWS give me a VPC
- 13:48now how do you define the size of a VPC
- 13:51in the previous case because it was a
- 13:53land you can Define the size of land in
- 13:55some Acres or in some hectares or
- 13:58something but how do you define the size
- 13:59of a VPC so for defining the size of VPC
- 14:02there is something called as IP address
- 14:04range
- 14:06okay so what is this IP address range so
- 14:09IP address range whenever a devops
- 14:11engineer creates a VPC what AWS asks is
- 14:15what is the IP address range so if you
- 14:17say for example the IP address range is
- 14:21172.16.0.0 16 that means AWS will
- 14:26allocate 255 into 255. now don't worry
- 14:30about this calculation what is obviously
- 14:31calculating and what is happening here
- 14:33you will understand this in future for
- 14:35Now understand that AWS will give you
- 14:3665536 IP addresses okay so how do you
- 14:40define the size of a VPC you can Define
- 14:42the size of VPC using the IP address
- 14:44ranges so devops engineer will say hey
- 14:47for our project in TCS I need this
- 14:50particular IP address range for the VPC
- 14:52which means I need 65536 IP addresses so
- 14:56technically you can assign this IP
- 14:58addresses to 65536 applications
- 15:01instances whatever you would like to
- 15:03call to right so this much IP addresses
- 15:06can be alleged using the VPC but what
- 15:08devops engineer will do is TCS can be
- 15:11one project but inside the project
- 15:14there will be multiple sub projects
- 15:16right so there can be one project
- 15:18related to payments one project related
- 15:20to transactions one project related to
- 15:21XYZ so
- 15:23what this devops engineer will do is for
- 15:26One internal project let's say there is
- 15:27one internal project here there is one
- 15:29internal project here one internal
- 15:31project here so this devops engineer
- 15:33will split the IP address ranges right
- 15:35so what he will say is okay for this
- 15:38particular uh sub project this
- 15:41particular sub project and this
- 15:42particular sub projects divide the IP
- 15:44addresses so here he will say
- 15:47172.16.1.0 24 2.0 24 3.0 24. so this
- 15:53particular thing will get some 255
- 15:55addresses this particular thing will get
- 15:57some 255 and this particular will get
- 15:59some 255 okay now again don't worry
- 16:01about the calculation how Abhishek is
- 16:03calculating and all that is irrelevant
- 16:05to this discussion for now just
- 16:06understand that for TCS there will be
- 16:09internal projects and depending upon the
- 16:11internal projects this devops engineer
- 16:13will split saying that okay even the VPC
- 16:17might have one IP address range but I
- 16:19will split them to three different IP
- 16:21address ranges for three projects and
- 16:23this part particular concept is called
- 16:24subnet
- 16:26okay the name itself says that it is sub
- 16:29Network right so it is subnet what you
- 16:32are doing here the VPC is created with a
- 16:35particular IP address range you are
- 16:37splitting the IP address for your sub
- 16:39projects devops engine is splitting this
- 16:41for the sub projects calling it subnet
- 16:43and inside this sub product let's say
- 16:45this sub product has only one
- 16:46application so you deploy an ec2
- 16:48instance and you deploy that application
- 16:50here there can be two instances here can
- 16:52one with three instances depending upon
- 16:54the sub project it is up to the sub
- 16:55project development leads how many
- 16:57applications do they want to deploy
- 16:59inside a subnet
- 17:01devops engineer as well but for now
- 17:03let's say
- 17:04this is the configuration so there is
- 17:06sub project sub project sub project one
- 17:08application two application three
- 17:09applications so now what devops engineer
- 17:11will do after this once he creates the
- 17:13subnet and all now devops engineer like
- 17:16we discussed in the previous example he
- 17:18will create a Gateway right why is this
- 17:21Gateway required if there is no Gateway
- 17:22nobody can access this particular
- 17:25uh VPC right so without a gate nobody
- 17:29can enter the Gated Community or the
- 17:30secure Community similarly without this
- 17:33gate nobody can access or enter to this
- 17:35entire uh property itself let's say
- 17:37there is a relative uh in previous case
- 17:39here let's say there is a customer who
- 17:41wants to access application in this ec2
- 17:43instance there is customer who wants to
- 17:45access application in this ec2 instance
- 17:47so he has to definitely come through
- 17:49this uh Gateway itself to the VPC so
- 17:52firstly there will be a Gateway and what
- 17:54this Gateway will do is Gateway is just
- 17:57like a pass for someone to enter to this
- 17:59VPC now once they enter what will happen
- 18:02like I told you this is one subnet this
- 18:04is one subnet and this is one subnet but
- 18:07this is all a free space right inside
- 18:10the VPC these are the subnets which we
- 18:13call as private subnets because they
- 18:15don't have access to Internet but then
- 18:17there is something called as public
- 18:18subnet right so what is public subnet
- 18:21public subnet is the one that a user
- 18:24first access inside at the VPC so how
- 18:27does public subnet connect to the user
- 18:29or how does public subnet connect to the
- 18:31internet basically is using the internet
- 18:33gateway so this particular thing this
- 18:36particular Gateway here we call it as
- 18:37internal Gateway sorry internet gateway
- 18:40through the internet gateway there is a
- 18:42public subnet from which the user enters
- 18:45to this okay once the user enters
- 18:48basically there let's say there is a
- 18:50load balancer here okay what is load
- 18:52balancer load balancer is the one that
- 18:55forwards the request depending upon the
- 18:57load for example there is this
- 18:59application and the user from the
- 19:01internet want to access this application
- 19:02now how will the request from this
- 19:05public subnet from the load balancer
- 19:07goes to this application right so there
- 19:09has to be a particular path
- 19:12so for this public subnet what you will
- 19:15do is you will create something called
- 19:16as a router in AWS terminology you will
- 19:19call it as a route table so you will
- 19:21create a route table this route table
- 19:23defines how should application or how
- 19:26should the request go to the application
- 19:27right so you have a load balancer load
- 19:30balancer can send the request depending
- 19:32upon the target group we will discuss
- 19:34about load balancer in detail later but
- 19:36for now just understand that there is an
- 19:38internet gateway once from the internet
- 19:40gateway there is a public subnet from
- 19:42the supply subnet request goes to the
- 19:44load balancer load balancer is assigned
- 19:46with the public subnet and for the load
- 19:49balancer what you will do is you will
- 19:50create a Target group of this
- 19:52application okay so now what happens is
- 19:55if the request from the load balancer
- 19:57has to go to the subnet load balancer
- 19:59does not know how to go to this
- 20:01particular thing so what you will do is
- 20:03further subnet you will create something
- 20:05called as a route table okay so this
- 20:08route table defines and tells the load
- 20:09the answer okay go through this
- 20:11particular path so that you reach me and
- 20:14once the request from internet now
- 20:16reached here but still at the ec2
- 20:19instance like I told you in the previous
- 20:20example there can be a security guard
- 20:22here who can block your request
- 20:24similarly for the ec2 instance there can
- 20:26be something called as Security Group
- 20:29okay so there will be something called
- 20:32as Security Group where this Security
- 20:34Group can say okay so on which Port do
- 20:38you want uh do you want to access me or
- 20:40from which IP address are you coming
- 20:41from what is your IP address then the
- 20:44security group can say okay only if it
- 20:46is coming from this particular IP
- 20:48address in the Internet only if you are
- 20:50trying to access me on a particular IP
- 20:51address then I will allow the access and
- 20:54that way you will finally reach your
- 20:56application okay so what is happening on
- 20:58the whole if someone from the Internet
- 21:00is trying to access an application in
- 21:03the private subnet here first of all he
- 21:05has to the request has to go through the
- 21:08internet gateway once it reach the
- 21:10internet gateway it will go to the
- 21:12public Subnet in the VPC right what is
- 21:14public subnet it's a common subnet
- 21:16across the VPC once it goes to the
- 21:19public subnet there is a load balancer
- 21:21here right what is load balancer doing
- 21:23load balancer is attached with the
- 21:25public subnet and load balancer has a
- 21:28Target group so when request goes to the
- 21:29load balancer load balancer is the one
- 21:31that takes the request to the private
- 21:34subnet and to the application right so
- 21:37to reach I mean for the load balancer to
- 21:39understand how to go to this application
- 21:42the subnet is here but what is the route
- 21:45path for the subnet so there is
- 21:47something called as route table right so
- 21:49route table is the one which defines the
- 21:51path once the path is defined it can go
- 21:53here but still there is something that
- 21:55can block that is called as a security
- 21:58group once the security group also
- 22:00allows you your request is finally
- 22:02reached now let's try to write these
- 22:03things okay so that you understand what
- 22:05exactly has happened first of all from
- 22:08the internet right so let's say this is
- 22:10internet
- 22:12there is person in the internet here he
- 22:14is using a laptop and what he is trying
- 22:16to do is he is trying to let's say
- 22:18access an application
- 22:20which is called
- 22:22for example example.com or okay let's
- 22:25leave the uh a domain and let's call he
- 22:29is trying to reach uh something called
- 22:32yeah
- 22:36172.16.3.1 slash something okay in
- 22:40general he'll not use the private IP
- 22:42address he will use the load balancer IP
- 22:44address to reach there but for your
- 22:45understanding let's say he's trying to
- 22:47reach one application in the private
- 22:48subnet okay so to reach what I have told
- 22:51you first is there is a devops engineer
- 22:53who has created a VPC right inside the
- 22:56VPC what is there here there is
- 22:59basically an internet gateway okay so
- 23:01let's say this is the internet gateway
- 23:03and then
- 23:05inside this VPC right if you call this
- 23:08entire thing as VPC which has a basic IP
- 23:11address block or the IP address range
- 23:13this entire thing has a IP address range
- 23:15inside this what he has done is for
- 23:17project a he has created a subnet
- 23:19project Cree Project B has created a
- 23:22subnet and project C has created a
- 23:23subnet again what is a subnet this is
- 23:26the entire IP address range so for each
- 23:29project you can divide the IP address
- 23:30range if this IP address range is
- 23:33172.16.0.0 16 this can be
- 23:39172.16.1.0
- 23:4024. 2.0 24
- 23:433.024 that way you can split now let's
- 23:46say there is one application inside the
- 23:48subnet one easy to instance and end goal
- 23:51is to reach from here from the internet
- 23:53which is completely outside of VPC you
- 23:56want to reach from here to here okay so
- 23:59what is the process firstly it will come
- 24:01here
- 24:02it will see that there is an internet
- 24:04gateway here it will pass through the
- 24:06internet gateway and once you pass
- 24:07through the intermediate way like I told
- 24:09you there is a public subnet here okay
- 24:11what is public subnet public subnet is
- 24:13the one that can be accessed to the
- 24:15public outside the VPC
- 24:16but they have to pass through the uh
- 24:19internet gateway once they pass through
- 24:21the internet gateway in the public
- 24:22subnet there is something called as load
- 24:24balancer in AWS world you will call it
- 24:26as elastic load balancer
- 24:29okay so you have elastic load balancer
- 24:31it can be application load balancer
- 24:33Network load balancer we'll talk about
- 24:34that later now you have an elastic load
- 24:36balancer here so what this elastic load
- 24:38balancer does is your request from the
- 24:41external world has reached the elastic
- 24:42load balancer from the elastic load
- 24:45balancer now it has to go here but how
- 24:47will the load balancer understand that
- 24:49it has to go here this is a private
- 24:51subnet right but for elastic load
- 24:55balancer or for the load balancer to
- 24:56send your request to the private subnet
- 24:58there has to be a proper route
- 25:01okay so who will Define this route there
- 25:04is like I told you something called as a
- 25:06route table
- 25:10okay now you need to have a route table
- 25:12and using this particular path your
- 25:14request has to flow right so what you
- 25:17will do is for elastic load balancer one
- 25:19thing you will attach the private subnet
- 25:21and you will attach the target group
- 25:23okay so what is Target group you will
- 25:25understand when you learn more about the
- 25:27elastic load balancer but for the load
- 25:30balancer to understand request has to go
- 25:32here firstly you need to create
- 25:33something called as Target group and you
- 25:35have to assign this instance to the
- 25:37Target group and at the same time the
- 25:39subnet should have the route table so
- 25:40that the traffic is Flowing here okay so
- 25:44and here like I told you there is a
- 25:45Security Group which can block the
- 25:47request or accept the request so these
- 25:49are the entire flow what are the
- 25:50components that we talked till now one
- 25:52is
- 25:53internet gateway
- 25:54then we talked about public subnet
- 25:58then we talked about load balancer
- 26:03then we talked about
- 26:05route tables which are basically routers
- 26:08in other terminology
- 26:11so routers are the one which forwards a
- 26:13request even from your home laptop if
- 26:15you are trying to access a particular
- 26:16website there are routers and there are
- 26:18multiple hops using multiple hubs
- 26:21different routers connect to each other
- 26:22and forward your request and finally a
- 26:24request goes to a particular server even
- 26:26in AWS that's the same but you call it
- 26:28as route table here
- 26:30so you have routable that you understood
- 26:32then you understood about security
- 26:34groups
- 26:36right so these are the critical
- 26:38components of VPC additionally there are
- 26:41few things which I'll cover very quickly
- 26:43but in future class that is in
- 26:45tomorrow's class we will talk about them
- 26:46in detail one is like let's say you have
- 26:49one Security Group here you have another
- 26:51Security Group here you have another
- 26:53Security Group here okay but within a
- 26:56subnet okay if you want to define the
- 26:58same Security Group to multiple
- 27:00applications multiple ec2 instances or
- 27:03you want to repeat the security group
- 27:04configuration there is something called
- 27:06as nacls okay nacls are basically
- 27:09automation for your security groups
- 27:11where instead of defining the same thing
- 27:13again and again you can Define that as
- 27:15part of nacls okay and finally there is
- 27:18one more concept that I will explain and
- 27:20I will conclude today's class that is
- 27:22the concept of nat gateways
- 27:26now what is net Gateway I'll try to
- 27:29explain in this scenario itself instead
- 27:30of directly explaining you the example
- 27:32and say uh the concept of NAD Gateway
- 27:34now the request from here has reached
- 27:37this application which is well and good
- 27:38but now what if
- 27:41the request I mean sorry now what if
- 27:43this particular application here tries
- 27:46to access something from the internet
- 27:48okay now till now we talked about this
- 27:50workflow right workflow flowing from
- 27:52here to here but what if the application
- 27:55tries to access something from the
- 27:57internet from google.com let's say this
- 27:59application wants to download a package
- 28:01which is quite common right you might
- 28:03want to download something to your
- 28:04server so there is a server here and you
- 28:07want to download something from internet
- 28:08so
- 28:09what is the problem here you might say
- 28:11that okay again it can use the public
- 28:13subnet and it can flow and it can access
- 28:15it the only problem is that okay uh okay
- 28:18the request can flow how the request
- 28:20will flow is a different challenge we
- 28:21will discuss that but the only thing is
- 28:23when someone tries to access some
- 28:26resource from the internet one of the
- 28:28critical things that you have to
- 28:29remember is if this is in the private
- 28:31subnet that means that there is some
- 28:33sort of security here so it is a bad
- 28:36practice to expose your applications or
- 28:39to expose your server's IP address to
- 28:41the internet okay so whoever is
- 28:44receiving this in the internet so let's
- 28:46say you are trying to download something
- 28:47from xyz.com okay so xyz.com should not
- 28:51know the IP address of your server or
- 28:54you should not know the IP address of
- 28:56your application anything it should not
- 28:58know
- 28:59uh sorry it should not know the IP
- 29:02address of your private subnets
- 29:04applications or the servers easy to
- 29:06instances okay so how do you avoid that
- 29:08you need to do a masking of IP address
- 29:10okay so this masking of IP address is
- 29:13called as Nat gateways so what does Nat
- 29:15gateways do is they will send you the
- 29:18request they will help you to download
- 29:20some resources from the internet but
- 29:23when you do that it will try to mask the
- 29:25IP address and it will change the IP
- 29:27address with the public IP address
- 29:29either of the load balancer or either of
- 29:31the router so if it is doing using the
- 29:33load balancer we call it a snat if it is
- 29:36doing through the router we call it as
- 29:37NAD Gateway okay so what is net Gateway
- 29:40basically doing it is helping you to
- 29:42download the resource from the internet
- 29:43and at the same time it is helping you
- 29:46to mask the IP address so without
- 29:48masking what will happen is again there
- 29:50can be a hacker who will know your IP
- 29:52address and he will try to do something
- 29:53with your network So to avoid that this
- 29:56Nat Gateway which is a concept which is
- 29:59available along with the ALB like if
- 30:01there is elb in the public subnet you
- 30:03will create Nat Gateway also in the
- 30:04public subnet only okay so NAD Gateway
- 30:07is created in the public subnet and what
- 30:09NAD Gateway will do is like there can be
- 30:11an ad Gateway here NAD Gateway here
- 30:13anywhere and what this Nat Gateway will
- 30:15do is it will help to download the
- 30:16package from internet and at the same
- 30:18time it will match the IP address so
- 30:20that this person will not know the
- 30:21actual IP address of the server or the
- 30:23actual address of the application that
- 30:25way your entire thing is secure okay so
- 30:28these are the different components of
- 30:30VPC we have learned a lot of concept
- 30:32today now your assignment would be to
- 30:34write down all of these components and
- 30:37go through the AWS documentation and and
- 30:39see whatever I have told you are you
- 30:41understanding it or not also most of you
- 30:43people know that there is a GitHub
- 30:45repository for AWS entire thing that we
- 30:48are learning even in that I have created
- 30:51a few notes so you can go through those
- 30:53notes and you can validate your
- 30:55understanding did I understand it
- 30:57correctly I have put some reference
- 30:59links I have put some diagrams you can
- 31:01go through those diagrams and evaluate
- 31:03if my if your understanding is correct
- 31:05or not end of the day what I would
- 31:06expect from today's class if someone is
- 31:09watching today's class they should
- 31:10understand what is VPC they should
- 31:12understand why a VPC is required why did
- 31:15I explain this example and how this
- 31:18example is correlating with the example
- 31:20of AWS VPC
- 31:23I hope you understood it I hope I
- 31:25explained uh it pretty much in a Layman
- 31:27terminology what is the entire flow and
- 31:29all when we do the practicals you will
- 31:31definitely understand this in an even
- 31:33better way right now these are the
- 31:35entire things these are the different
- 31:36components that are involved in a VPC
- 31:38I've covered most of the components if
- 31:41not everything there is one more thing
- 31:43sorry uh there is one last thing if you
- 31:45want to debug this entire thing and if
- 31:47you want to understand this entire flow
- 31:48of how the traffic is flowing and what
- 31:51is happening how many requests have come
- 31:52to the VPC and all there is one final
- 31:54concept that is called as VPC flow logs
- 31:57okay so VPC flow logs also does the same
- 32:00thing where it records every action
- 32:02whatever I explained like uh here I have
- 32:05explained that traffic is going from
- 32:06here to here what is happening how which
- 32:08server is getting the request so there
- 32:10is one particular thing called as VPC
- 32:12flow logs which is chargeable so inside
- 32:14the VPC there are few things that are
- 32:16chargeable there are few things in order
- 32:17not chargeable when we do the practicals
- 32:19I'll also explain that
- 32:21so finally if you found today's video
- 32:23informative definitely share the
- 32:25feedback with me uh put it in the
- 32:27comment section Abhishek I have
- 32:29understood this I have not understood
- 32:31this I'll really appreciate your
- 32:32feedback and if you know someone who
- 32:34wants to understand VPC and this entire
- 32:36concept please share the video with
- 32:38those people thank you so much for
- 32:40watching the video If you haven't
- 32:41subscribed to the Channel Please
- 32:42Subscribe take care everyone see you all
- 32:44in the next video bye thank you
About this transcript
This page contains the full transcript of YouTube transcript (P8g7Z4NYk3Q) , generated from the public captions YouTube serves with the video. The transcript has 6,135 words across 874 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.