YouTube2Text

YouTube transcript (P8g7Z4NYk3Q) — Transcript

6,135 words · 874 segments · language en · Watch on YouTube

Full transcript

  1. 0:01hello everyone my name is Abhishek and
  2. 0:04welcome back to my channel and also
  3. 0:06welcome to one more episode of AWS 020
  4. 0:09Series in this video I'll Deep dive
  5. 0:11through one of the most complicated
  6. 0:13topics of AWS that is virtual private
  7. 0:16Cloud also known as VPC
  8. 0:19so today's class let's learn what is
  9. 0:22virtual private Cloud let's understand
  10. 0:24why you need virtual private Cloud what
  11. 0:27are the different components of virtual
  12. 0:29private cloud and also how do they
  13. 0:31interact with each other
  14. 0:33and finally
  15. 0:35there is a fear amongst a lot of people
  16. 0:37that virtual private cloud is a
  17. 0:39difficult topic you might say that yes
  18. 0:41Abhishek we have that concern because
  19. 0:44VPC involves a lot of networking there
  20. 0:47are multiple components and it's
  21. 0:48difficult to understand why and how each
  22. 0:50of these component is interacting what
  23. 0:52purposeful they're solving so don't
  24. 0:54worry if you have any such fear or even
  25. 0:56if you are completely new to networking
  26. 0:58and VPC after today's video you along
  27. 1:01with me will say that virtual private
  28. 1:04cloud is an easy concept and I
  29. 1:06understand this concept end to end so we
  30. 1:09will do practicals as well but practical
  31. 1:11will not be part of today's video
  32. 1:12because it is very very important to
  33. 1:16have strong foundational knowledge on
  34. 1:18VPC so today's video I will try to add
  35. 1:21that foundational knowledge on VPC for
  36. 1:24you and in tomorrow's video we will Deep
  37. 1:26dive into slightly more complicated
  38. 1:28topic of VPC that is related to security
  39. 1:30and in day after video we will try to do
  40. 1:33a practical video deploy application
  41. 1:35inside VPC and explore the complete flow
  42. 1:37of VPC so that will be the entire thing
  43. 1:40but how will I make this concept easy
  44. 1:42for you you might ask me what I do is I
  45. 1:45will take a real life scenario okay so
  46. 1:48we will take a very much real life
  47. 1:49scenario that all of us understand and
  48. 1:52we will use the same real life scenario
  49. 1:54to understand the concept of VPC so this
  50. 1:57real life scenario has nothing to do
  51. 1:59with AWS but still I will correlate and
  52. 2:01make this concept very very easy for you
  53. 2:03in the lines of AWS
  54. 2:06so let's quickly start the video and
  55. 2:08understand virtual private cloud
  56. 2:11so to start with the example the
  57. 2:13scenario that I was talking about let's
  58. 2:14say that there is a huge land okay so
  59. 2:18let's call this as a village okay so we
  60. 2:21have a village and there are a lot of
  61. 2:23people in this Village but there are
  62. 2:24specific set of lazy people in this
  63. 2:26Village okay so these lazy people are
  64. 2:30lazy enough that they can't construct
  65. 2:33their own houses
  66. 2:34why they can't construct their own
  67. 2:36houses because they don't want to
  68. 2:38maintain their houses they don't want to
  69. 2:40manage their houses and also they don't
  70. 2:42want to go through all the construction
  71. 2:43process and everything related to their
  72. 2:45houses so these people they are actually
  73. 2:49looking for some people and at the same
  74. 2:52time there is one wise person in this
  75. 2:54Village okay let's say that this wise
  76. 2:57person is called ABC so there is a wise
  77. 3:00person called ABC in the village what he
  78. 3:03has done is he saw this opportunity of
  79. 3:05lazy people and he said that okay let me
  80. 3:07grab this opportunity and make money out
  81. 3:09of it so this wise person ABC what he
  82. 3:12has done is he's went to this Village
  83. 3:15and he acquired a huge land in this
  84. 3:17Village
  85. 3:18okay so you acquired this entire land in
  86. 3:21this Village and he said that okay hey
  87. 3:23lazy people what I'm going to do is I am
  88. 3:26going to construct the houses for you
  89. 3:27but for that you have to send me a
  90. 3:30request with your entire requirements
  91. 3:32like what are the resources that you
  92. 3:33require in this house what is the
  93. 3:35capacity uh that you require in this
  94. 3:37house and fill me all the details and
  95. 3:39give it to me and in return I give you
  96. 3:42house and I'll take money from you right
  97. 3:44so this person has started the process
  98. 3:47and what this ABC or the vice person has
  99. 3:50done is he has constructed this house in
  100. 3:53the land that he has acquired so he
  101. 3:55purchased this entire land and he uh
  102. 3:57constructed a house and he said that
  103. 3:59I'll maintain this house for you
  104. 4:01so this person felt happy for it and
  105. 4:03then seeing this other person also
  106. 4:05approached and he has constructed house
  107. 4:06for the other person as well so in
  108. 4:08future there is one more person and he
  109. 4:10has constructed house for that one more
  110. 4:12person so it is going well and all of
  111. 4:15these people their problem is solved
  112. 4:16that uh they don't want to maintain the
  113. 4:18entire construction and maintenance this
  114. 4:21person the wise person ABC is taking
  115. 4:23care of it and they are all happy but
  116. 4:25there are other bunch of people what
  117. 4:27they have done is they saw this they
  118. 4:29were happy about it but they realized
  119. 4:31that these bunch of people they have
  120. 4:33realized that there is some kind of
  121. 4:35security issue here there is some kind
  122. 4:36of privacy Beach that means
  123. 4:39for the purpose of saving a lot of money
  124. 4:42what this person has done is he has
  125. 4:43constructed the houses but they are very
  126. 4:45nearby and there is some kind of
  127. 4:47security breach that anyone who access
  128. 4:49this house can has can hack uh hack or
  129. 4:52access the other house and can also
  130. 4:54access the other house so that way there
  131. 4:56is some kind of security breach that is
  132. 4:58happening here so these people said that
  133. 4:59okay we are also looking for houses from
  134. 5:01you but we want it in a much better way
  135. 5:04not in this way where if one of these
  136. 5:06houses compromised that the other houses
  137. 5:08are also compromised so this person
  138. 5:10to not to lose the business and you know
  139. 5:13because he want to construct more and
  140. 5:15more uh these things what he said is
  141. 5:17okay give me some time and he came back
  142. 5:19with A New Concept called secure land
  143. 5:22okay so what he said is okay I have this
  144. 5:25entire property but if you come as a
  145. 5:28group where if you want a group housing
  146. 5:30or something what I can do is I can
  147. 5:33build a secure
  148. 5:34property for you people
  149. 5:36so inside this entire land what this
  150. 5:40person ABC has done is he has built a
  151. 5:42secure property for these people and
  152. 5:44this security property what he said is
  153. 5:46only people who have access to the
  154. 5:50secure property like he said that I'll
  155. 5:51construct a gate here which will act as
  156. 5:53a Gateway right so this gate will act as
  157. 5:55a Gateway and only these people or the
  158. 5:58people's relatives or people who know
  159. 6:01these people only can enter this secure
  160. 6:03property right so what happens is let's
  161. 6:06say someone wants to meet this person
  162. 6:07okay and this person has one property
  163. 6:10here the other person this person has
  164. 6:13one property here and this person has a
  165. 6:15property here
  166. 6:16right so now there is one of the
  167. 6:19relatives of this person right let's
  168. 6:20call this person as a now the reality of
  169. 6:23a wants to meet this person so what the
  170. 6:27secure property does is this person can
  171. 6:30definitely meet him but he first has to
  172. 6:33pass through this gate so there can be a
  173. 6:34security guard or someone who will guard
  174. 6:36this property and once he enters this so
  175. 6:39this is a property that all of these
  176. 6:41people own right so the secure property
  177. 6:43this is all the public thing where
  178. 6:45everybody owns this but if this person
  179. 6:47this XYZ person let's say he wants to go
  180. 6:51and meet this person called a now he
  181. 6:53need to understand how to go to this
  182. 6:55property right now because I am drawing
  183. 6:57this picture you know how to go from
  184. 6:58here to here but eventually to go from
  185. 7:01here to here there has to be another
  186. 7:02guide here so this guide basically
  187. 7:05explains okay move from here to here and
  188. 7:07finally you will reach the person a
  189. 7:09again once you reach this person a there
  190. 7:12will be another security guard or there
  191. 7:14will be some kind of person here who
  192. 7:16will validate okay is this the right
  193. 7:18person you entered the Gateway you moved
  194. 7:21into the secure property but again do
  195. 7:22you want to meet a do you want to meet B
  196. 7:24do you want to meet C so if you are a
  197. 7:26valid person who wants to meet a then
  198. 7:28only I will accept your request to purse
  199. 7:31meet the person a so this way what this
  200. 7:35ABC the wise person has done is he has
  201. 7:38solved the problem of security breach
  202. 7:40and solve the problem of security and
  203. 7:42now everybody is enjoying the secure
  204. 7:44property looking at these people there
  205. 7:47are another bunch of people who came to
  206. 7:49him and he has built another secure
  207. 7:50property another secure property another
  208. 7:53secure property this way he started
  209. 7:55making his business now why did I
  210. 7:57explain this story to you people you
  211. 7:59might be thinking has Abhishek gone mad
  212. 8:01why is he saying all of these things and
  213. 8:03how we
  214. 8:05how is it going to be related to AWS
  215. 8:07okay now let's try to relate the same
  216. 8:10thing to AWS in the last class I showed
  217. 8:12you how to create an ec2 instance how to
  218. 8:14deploy an application and how to access
  219. 8:16that application right so now
  220. 8:19let's go to the same scenario where
  221. 8:22there is this big
  222. 8:24region okay so let's call this region as
  223. 8:28Mumbai or Ohio or whatever you would
  224. 8:30like to what happened was there are
  225. 8:33people okay so there are companies let's
  226. 8:36say this company as example.com this
  227. 8:39company has example1.com then there is
  228. 8:41another company called example2.com so
  229. 8:44these people initially they were
  230. 8:46maintaining their own data centers but
  231. 8:47it was becoming too hectic for them so
  232. 8:50they said that okay uh if there is
  233. 8:51someone who is going to help us with
  234. 8:53this data center we'll off-board that to
  235. 8:55them or there is a new startup now they
  236. 8:58said that okay we can't afford to build
  237. 8:59a new data center we can't afford to
  238. 9:01maintain it now we are also looking for
  239. 9:03someone so AWS saw this opportunity
  240. 9:05right so in this case who is the vice
  241. 9:08person AWS is the vice person what AWS
  242. 9:11said is hey okay what I can do is inside
  243. 9:15this region let's say there is region
  244. 9:16called Mumbai or Ohio or throughout the
  245. 9:18world what AWS did is AWS started
  246. 9:21building their own data centers
  247. 9:24in the previous example that person has
  248. 9:26acquired a lot of land right the wise
  249. 9:28person here what AWS did is AWS started
  250. 9:31purchasing or building their own data
  251. 9:33center so AWS built this entire data
  252. 9:35center in Mumbai region for example or
  253. 9:37Ohio region or Frankfurt anywhere AWS
  254. 9:41started building their own data centers
  255. 9:43now what AWS said is
  256. 9:46hey lazy companies or hey startup hey
  257. 9:50example one example two example three so
  258. 9:52we can
  259. 9:53host your applications inside our data
  260. 9:56centers or you can request us saying
  261. 9:58that hey I want one virtual machine I
  262. 10:00want 10 virtual machines I want 20
  263. 10:01virtual machines and we will take your
  264. 10:03request you give me money and I will
  265. 10:05create the instances for you so this was
  266. 10:07going by uh I mean this exact same thing
  267. 10:10what we did uh previously and this was
  268. 10:12going very fine where example.com one uh
  269. 10:16they requested and what AWS did so this
  270. 10:19is the story of 2013 2014. okay so
  271. 10:22during this time what AWS did is if
  272. 10:24example.com is requesting it uh 10 ec2
  273. 10:28instances so it went to the data center
  274. 10:31in region Mumbai or whichever region it
  275. 10:33requested and it created 10 ec2
  276. 10:35instances okay so again inside the data
  277. 10:38centers there will be multiple physical
  278. 10:40servers let's say this is a physical
  279. 10:41server and example.com requested two ec2
  280. 10:44instances so it gave two ec2 instances
  281. 10:45inside This Server let's call it server
  282. 10:48one
  283. 10:49so then there is example two and what
  284. 10:52AWS did is it created again
  285. 10:55request of example 2 in the server one
  286. 10:58only then there is example three and
  287. 11:00what AWS did is again it went to here
  288. 11:03and it created server let's say it
  289. 11:05requested for one server it created in
  290. 11:07server one only here what I'm talking
  291. 11:08about virtual machine one what's the two
  292. 11:10virtual machines and two virtual
  293. 11:12machines so this is fine all of this
  294. 11:15problem is solved and AWS is also giving
  295. 11:17them virtual machines inside the data
  296. 11:19center inside data center like I told
  297. 11:20you there can be multiple servers for
  298. 11:22one server AWS choose one server and
  299. 11:24solved all of their problem
  300. 11:26but what happened is let's say so this
  301. 11:29is a theory what happened what can
  302. 11:31happen is that in this case so if there
  303. 11:33is a hacker and let's say this is
  304. 11:35startup okay let's say this is startup
  305. 11:37if there is a hacker here because they
  306. 11:38were not maintaining proper security he
  307. 11:40entered into this server he tried to
  308. 11:42make some false requests to this
  309. 11:44application inside uh the physical
  310. 11:46virtual machine and he was able to hack
  311. 11:49this particular server now because all
  312. 11:52of them are in the same physical server
  313. 11:54inside the AWS data center hacker can
  314. 11:56easily come here hacker can easily come
  315. 11:58here hacker can easily come here and he
  316. 12:01can hack the entire thing right so just
  317. 12:04because of example three or just because
  318. 12:07of startup what happened is all of the
  319. 12:10servers are hacked because AWS was
  320. 12:12creating entire instances or AWS was
  321. 12:15creating all the things in same things
  322. 12:17or it can also create in different
  323. 12:18things but what happens if it creates in
  324. 12:20the same server right so till 2013 2014
  325. 12:23this was happening so to solve this
  326. 12:25problem like I told you even in the
  327. 12:27previous example to solve the security
  328. 12:29breach what AWS said is okay we will
  329. 12:31come up with a new Concept in that case
  330. 12:33it was Secure community in AWS terms it
  331. 12:36is called as VPC right so what aw said
  332. 12:40is we will build a VPC for you or
  333. 12:44in the other way around like in the
  334. 12:46previous case the Builder will build the
  335. 12:47entire secure community and give it to
  336. 12:49you but in the AWS terms AWS will give
  337. 12:52you a documentation AWS will give you
  338. 12:54examples who is the one who builds this
  339. 12:56entire VPC and maintains the VPC it is
  340. 12:58devops or AWS devops Engineers okay so
  341. 13:02AWS devops engineer looking at the
  342. 13:04documentation of AWS they will go to the
  343. 13:06AWS portal and they will request for the
  344. 13:08VPC and they will configure everything
  345. 13:10inside the VPC now let's see what is
  346. 13:12inside the VPC using the same example
  347. 13:14itself in the same example what I told
  348. 13:16you I'll try to convert that into AWS
  349. 13:19example right so this is AWS Data Center
  350. 13:24again so there is let's take example of
  351. 13:28one company here so let's say there is
  352. 13:30TCS and inside TCS there is one project
  353. 13:35and this project is owned by a devops
  354. 13:37engineer so what this devops engineer
  355. 13:39does is he will go to AWS and let's say
  356. 13:42there is a region called Mumbai he'll go
  357. 13:45to AWS and say hey AWS give me a VPC
  358. 13:48now how do you define the size of a VPC
  359. 13:51in the previous case because it was a
  360. 13:53land you can Define the size of land in
  361. 13:55some Acres or in some hectares or
  362. 13:58something but how do you define the size
  363. 13:59of a VPC so for defining the size of VPC
  364. 14:02there is something called as IP address
  365. 14:04range
  366. 14:06okay so what is this IP address range so
  367. 14:09IP address range whenever a devops
  368. 14:11engineer creates a VPC what AWS asks is
  369. 14:15what is the IP address range so if you
  370. 14:17say for example the IP address range is
  371. 14:21172.16.0.0 16 that means AWS will
  372. 14:26allocate 255 into 255. now don't worry
  373. 14:30about this calculation what is obviously
  374. 14:31calculating and what is happening here
  375. 14:33you will understand this in future for
  376. 14:35Now understand that AWS will give you
  377. 14:3665536 IP addresses okay so how do you
  378. 14:40define the size of a VPC you can Define
  379. 14:42the size of VPC using the IP address
  380. 14:44ranges so devops engineer will say hey
  381. 14:47for our project in TCS I need this
  382. 14:50particular IP address range for the VPC
  383. 14:52which means I need 65536 IP addresses so
  384. 14:56technically you can assign this IP
  385. 14:58addresses to 65536 applications
  386. 15:01instances whatever you would like to
  387. 15:03call to right so this much IP addresses
  388. 15:06can be alleged using the VPC but what
  389. 15:08devops engineer will do is TCS can be
  390. 15:11one project but inside the project
  391. 15:14there will be multiple sub projects
  392. 15:16right so there can be one project
  393. 15:18related to payments one project related
  394. 15:20to transactions one project related to
  395. 15:21XYZ so
  396. 15:23what this devops engineer will do is for
  397. 15:26One internal project let's say there is
  398. 15:27one internal project here there is one
  399. 15:29internal project here one internal
  400. 15:31project here so this devops engineer
  401. 15:33will split the IP address ranges right
  402. 15:35so what he will say is okay for this
  403. 15:38particular uh sub project this
  404. 15:41particular sub project and this
  405. 15:42particular sub projects divide the IP
  406. 15:44addresses so here he will say
  407. 15:47172.16.1.0 24 2.0 24 3.0 24. so this
  408. 15:53particular thing will get some 255
  409. 15:55addresses this particular thing will get
  410. 15:57some 255 and this particular will get
  411. 15:59some 255 okay now again don't worry
  412. 16:01about the calculation how Abhishek is
  413. 16:03calculating and all that is irrelevant
  414. 16:05to this discussion for now just
  415. 16:06understand that for TCS there will be
  416. 16:09internal projects and depending upon the
  417. 16:11internal projects this devops engineer
  418. 16:13will split saying that okay even the VPC
  419. 16:17might have one IP address range but I
  420. 16:19will split them to three different IP
  421. 16:21address ranges for three projects and
  422. 16:23this part particular concept is called
  423. 16:24subnet
  424. 16:26okay the name itself says that it is sub
  425. 16:29Network right so it is subnet what you
  426. 16:32are doing here the VPC is created with a
  427. 16:35particular IP address range you are
  428. 16:37splitting the IP address for your sub
  429. 16:39projects devops engine is splitting this
  430. 16:41for the sub projects calling it subnet
  431. 16:43and inside this sub product let's say
  432. 16:45this sub product has only one
  433. 16:46application so you deploy an ec2
  434. 16:48instance and you deploy that application
  435. 16:50here there can be two instances here can
  436. 16:52one with three instances depending upon
  437. 16:54the sub project it is up to the sub
  438. 16:55project development leads how many
  439. 16:57applications do they want to deploy
  440. 16:59inside a subnet
  441. 17:01devops engineer as well but for now
  442. 17:03let's say
  443. 17:04this is the configuration so there is
  444. 17:06sub project sub project sub project one
  445. 17:08application two application three
  446. 17:09applications so now what devops engineer
  447. 17:11will do after this once he creates the
  448. 17:13subnet and all now devops engineer like
  449. 17:16we discussed in the previous example he
  450. 17:18will create a Gateway right why is this
  451. 17:21Gateway required if there is no Gateway
  452. 17:22nobody can access this particular
  453. 17:25uh VPC right so without a gate nobody
  454. 17:29can enter the Gated Community or the
  455. 17:30secure Community similarly without this
  456. 17:33gate nobody can access or enter to this
  457. 17:35entire uh property itself let's say
  458. 17:37there is a relative uh in previous case
  459. 17:39here let's say there is a customer who
  460. 17:41wants to access application in this ec2
  461. 17:43instance there is customer who wants to
  462. 17:45access application in this ec2 instance
  463. 17:47so he has to definitely come through
  464. 17:49this uh Gateway itself to the VPC so
  465. 17:52firstly there will be a Gateway and what
  466. 17:54this Gateway will do is Gateway is just
  467. 17:57like a pass for someone to enter to this
  468. 17:59VPC now once they enter what will happen
  469. 18:02like I told you this is one subnet this
  470. 18:04is one subnet and this is one subnet but
  471. 18:07this is all a free space right inside
  472. 18:10the VPC these are the subnets which we
  473. 18:13call as private subnets because they
  474. 18:15don't have access to Internet but then
  475. 18:17there is something called as public
  476. 18:18subnet right so what is public subnet
  477. 18:21public subnet is the one that a user
  478. 18:24first access inside at the VPC so how
  479. 18:27does public subnet connect to the user
  480. 18:29or how does public subnet connect to the
  481. 18:31internet basically is using the internet
  482. 18:33gateway so this particular thing this
  483. 18:36particular Gateway here we call it as
  484. 18:37internal Gateway sorry internet gateway
  485. 18:40through the internet gateway there is a
  486. 18:42public subnet from which the user enters
  487. 18:45to this okay once the user enters
  488. 18:48basically there let's say there is a
  489. 18:50load balancer here okay what is load
  490. 18:52balancer load balancer is the one that
  491. 18:55forwards the request depending upon the
  492. 18:57load for example there is this
  493. 18:59application and the user from the
  494. 19:01internet want to access this application
  495. 19:02now how will the request from this
  496. 19:05public subnet from the load balancer
  497. 19:07goes to this application right so there
  498. 19:09has to be a particular path
  499. 19:12so for this public subnet what you will
  500. 19:15do is you will create something called
  501. 19:16as a router in AWS terminology you will
  502. 19:19call it as a route table so you will
  503. 19:21create a route table this route table
  504. 19:23defines how should application or how
  505. 19:26should the request go to the application
  506. 19:27right so you have a load balancer load
  507. 19:30balancer can send the request depending
  508. 19:32upon the target group we will discuss
  509. 19:34about load balancer in detail later but
  510. 19:36for now just understand that there is an
  511. 19:38internet gateway once from the internet
  512. 19:40gateway there is a public subnet from
  513. 19:42the supply subnet request goes to the
  514. 19:44load balancer load balancer is assigned
  515. 19:46with the public subnet and for the load
  516. 19:49balancer what you will do is you will
  517. 19:50create a Target group of this
  518. 19:52application okay so now what happens is
  519. 19:55if the request from the load balancer
  520. 19:57has to go to the subnet load balancer
  521. 19:59does not know how to go to this
  522. 20:01particular thing so what you will do is
  523. 20:03further subnet you will create something
  524. 20:05called as a route table okay so this
  525. 20:08route table defines and tells the load
  526. 20:09the answer okay go through this
  527. 20:11particular path so that you reach me and
  528. 20:14once the request from internet now
  529. 20:16reached here but still at the ec2
  530. 20:19instance like I told you in the previous
  531. 20:20example there can be a security guard
  532. 20:22here who can block your request
  533. 20:24similarly for the ec2 instance there can
  534. 20:26be something called as Security Group
  535. 20:29okay so there will be something called
  536. 20:32as Security Group where this Security
  537. 20:34Group can say okay so on which Port do
  538. 20:38you want uh do you want to access me or
  539. 20:40from which IP address are you coming
  540. 20:41from what is your IP address then the
  541. 20:44security group can say okay only if it
  542. 20:46is coming from this particular IP
  543. 20:48address in the Internet only if you are
  544. 20:50trying to access me on a particular IP
  545. 20:51address then I will allow the access and
  546. 20:54that way you will finally reach your
  547. 20:56application okay so what is happening on
  548. 20:58the whole if someone from the Internet
  549. 21:00is trying to access an application in
  550. 21:03the private subnet here first of all he
  551. 21:05has to the request has to go through the
  552. 21:08internet gateway once it reach the
  553. 21:10internet gateway it will go to the
  554. 21:12public Subnet in the VPC right what is
  555. 21:14public subnet it's a common subnet
  556. 21:16across the VPC once it goes to the
  557. 21:19public subnet there is a load balancer
  558. 21:21here right what is load balancer doing
  559. 21:23load balancer is attached with the
  560. 21:25public subnet and load balancer has a
  561. 21:28Target group so when request goes to the
  562. 21:29load balancer load balancer is the one
  563. 21:31that takes the request to the private
  564. 21:34subnet and to the application right so
  565. 21:37to reach I mean for the load balancer to
  566. 21:39understand how to go to this application
  567. 21:42the subnet is here but what is the route
  568. 21:45path for the subnet so there is
  569. 21:47something called as route table right so
  570. 21:49route table is the one which defines the
  571. 21:51path once the path is defined it can go
  572. 21:53here but still there is something that
  573. 21:55can block that is called as a security
  574. 21:58group once the security group also
  575. 22:00allows you your request is finally
  576. 22:02reached now let's try to write these
  577. 22:03things okay so that you understand what
  578. 22:05exactly has happened first of all from
  579. 22:08the internet right so let's say this is
  580. 22:10internet
  581. 22:12there is person in the internet here he
  582. 22:14is using a laptop and what he is trying
  583. 22:16to do is he is trying to let's say
  584. 22:18access an application
  585. 22:20which is called
  586. 22:22for example example.com or okay let's
  587. 22:25leave the uh a domain and let's call he
  588. 22:29is trying to reach uh something called
  589. 22:32yeah
  590. 22:36172.16.3.1 slash something okay in
  591. 22:40general he'll not use the private IP
  592. 22:42address he will use the load balancer IP
  593. 22:44address to reach there but for your
  594. 22:45understanding let's say he's trying to
  595. 22:47reach one application in the private
  596. 22:48subnet okay so to reach what I have told
  597. 22:51you first is there is a devops engineer
  598. 22:53who has created a VPC right inside the
  599. 22:56VPC what is there here there is
  600. 22:59basically an internet gateway okay so
  601. 23:01let's say this is the internet gateway
  602. 23:03and then
  603. 23:05inside this VPC right if you call this
  604. 23:08entire thing as VPC which has a basic IP
  605. 23:11address block or the IP address range
  606. 23:13this entire thing has a IP address range
  607. 23:15inside this what he has done is for
  608. 23:17project a he has created a subnet
  609. 23:19project Cree Project B has created a
  610. 23:22subnet and project C has created a
  611. 23:23subnet again what is a subnet this is
  612. 23:26the entire IP address range so for each
  613. 23:29project you can divide the IP address
  614. 23:30range if this IP address range is
  615. 23:33172.16.0.0 16 this can be
  616. 23:39172.16.1.0
  617. 23:4024. 2.0 24
  618. 23:433.024 that way you can split now let's
  619. 23:46say there is one application inside the
  620. 23:48subnet one easy to instance and end goal
  621. 23:51is to reach from here from the internet
  622. 23:53which is completely outside of VPC you
  623. 23:56want to reach from here to here okay so
  624. 23:59what is the process firstly it will come
  625. 24:01here
  626. 24:02it will see that there is an internet
  627. 24:04gateway here it will pass through the
  628. 24:06internet gateway and once you pass
  629. 24:07through the intermediate way like I told
  630. 24:09you there is a public subnet here okay
  631. 24:11what is public subnet public subnet is
  632. 24:13the one that can be accessed to the
  633. 24:15public outside the VPC
  634. 24:16but they have to pass through the uh
  635. 24:19internet gateway once they pass through
  636. 24:21the internet gateway in the public
  637. 24:22subnet there is something called as load
  638. 24:24balancer in AWS world you will call it
  639. 24:26as elastic load balancer
  640. 24:29okay so you have elastic load balancer
  641. 24:31it can be application load balancer
  642. 24:33Network load balancer we'll talk about
  643. 24:34that later now you have an elastic load
  644. 24:36balancer here so what this elastic load
  645. 24:38balancer does is your request from the
  646. 24:41external world has reached the elastic
  647. 24:42load balancer from the elastic load
  648. 24:45balancer now it has to go here but how
  649. 24:47will the load balancer understand that
  650. 24:49it has to go here this is a private
  651. 24:51subnet right but for elastic load
  652. 24:55balancer or for the load balancer to
  653. 24:56send your request to the private subnet
  654. 24:58there has to be a proper route
  655. 25:01okay so who will Define this route there
  656. 25:04is like I told you something called as a
  657. 25:06route table
  658. 25:10okay now you need to have a route table
  659. 25:12and using this particular path your
  660. 25:14request has to flow right so what you
  661. 25:17will do is for elastic load balancer one
  662. 25:19thing you will attach the private subnet
  663. 25:21and you will attach the target group
  664. 25:23okay so what is Target group you will
  665. 25:25understand when you learn more about the
  666. 25:27elastic load balancer but for the load
  667. 25:30balancer to understand request has to go
  668. 25:32here firstly you need to create
  669. 25:33something called as Target group and you
  670. 25:35have to assign this instance to the
  671. 25:37Target group and at the same time the
  672. 25:39subnet should have the route table so
  673. 25:40that the traffic is Flowing here okay so
  674. 25:44and here like I told you there is a
  675. 25:45Security Group which can block the
  676. 25:47request or accept the request so these
  677. 25:49are the entire flow what are the
  678. 25:50components that we talked till now one
  679. 25:52is
  680. 25:53internet gateway
  681. 25:54then we talked about public subnet
  682. 25:58then we talked about load balancer
  683. 26:03then we talked about
  684. 26:05route tables which are basically routers
  685. 26:08in other terminology
  686. 26:11so routers are the one which forwards a
  687. 26:13request even from your home laptop if
  688. 26:15you are trying to access a particular
  689. 26:16website there are routers and there are
  690. 26:18multiple hops using multiple hubs
  691. 26:21different routers connect to each other
  692. 26:22and forward your request and finally a
  693. 26:24request goes to a particular server even
  694. 26:26in AWS that's the same but you call it
  695. 26:28as route table here
  696. 26:30so you have routable that you understood
  697. 26:32then you understood about security
  698. 26:34groups
  699. 26:36right so these are the critical
  700. 26:38components of VPC additionally there are
  701. 26:41few things which I'll cover very quickly
  702. 26:43but in future class that is in
  703. 26:45tomorrow's class we will talk about them
  704. 26:46in detail one is like let's say you have
  705. 26:49one Security Group here you have another
  706. 26:51Security Group here you have another
  707. 26:53Security Group here okay but within a
  708. 26:56subnet okay if you want to define the
  709. 26:58same Security Group to multiple
  710. 27:00applications multiple ec2 instances or
  711. 27:03you want to repeat the security group
  712. 27:04configuration there is something called
  713. 27:06as nacls okay nacls are basically
  714. 27:09automation for your security groups
  715. 27:11where instead of defining the same thing
  716. 27:13again and again you can Define that as
  717. 27:15part of nacls okay and finally there is
  718. 27:18one more concept that I will explain and
  719. 27:20I will conclude today's class that is
  720. 27:22the concept of nat gateways
  721. 27:26now what is net Gateway I'll try to
  722. 27:29explain in this scenario itself instead
  723. 27:30of directly explaining you the example
  724. 27:32and say uh the concept of NAD Gateway
  725. 27:34now the request from here has reached
  726. 27:37this application which is well and good
  727. 27:38but now what if
  728. 27:41the request I mean sorry now what if
  729. 27:43this particular application here tries
  730. 27:46to access something from the internet
  731. 27:48okay now till now we talked about this
  732. 27:50workflow right workflow flowing from
  733. 27:52here to here but what if the application
  734. 27:55tries to access something from the
  735. 27:57internet from google.com let's say this
  736. 27:59application wants to download a package
  737. 28:01which is quite common right you might
  738. 28:03want to download something to your
  739. 28:04server so there is a server here and you
  740. 28:07want to download something from internet
  741. 28:08so
  742. 28:09what is the problem here you might say
  743. 28:11that okay again it can use the public
  744. 28:13subnet and it can flow and it can access
  745. 28:15it the only problem is that okay uh okay
  746. 28:18the request can flow how the request
  747. 28:20will flow is a different challenge we
  748. 28:21will discuss that but the only thing is
  749. 28:23when someone tries to access some
  750. 28:26resource from the internet one of the
  751. 28:28critical things that you have to
  752. 28:29remember is if this is in the private
  753. 28:31subnet that means that there is some
  754. 28:33sort of security here so it is a bad
  755. 28:36practice to expose your applications or
  756. 28:39to expose your server's IP address to
  757. 28:41the internet okay so whoever is
  758. 28:44receiving this in the internet so let's
  759. 28:46say you are trying to download something
  760. 28:47from xyz.com okay so xyz.com should not
  761. 28:51know the IP address of your server or
  762. 28:54you should not know the IP address of
  763. 28:56your application anything it should not
  764. 28:58know
  765. 28:59uh sorry it should not know the IP
  766. 29:02address of your private subnets
  767. 29:04applications or the servers easy to
  768. 29:06instances okay so how do you avoid that
  769. 29:08you need to do a masking of IP address
  770. 29:10okay so this masking of IP address is
  771. 29:13called as Nat gateways so what does Nat
  772. 29:15gateways do is they will send you the
  773. 29:18request they will help you to download
  774. 29:20some resources from the internet but
  775. 29:23when you do that it will try to mask the
  776. 29:25IP address and it will change the IP
  777. 29:27address with the public IP address
  778. 29:29either of the load balancer or either of
  779. 29:31the router so if it is doing using the
  780. 29:33load balancer we call it a snat if it is
  781. 29:36doing through the router we call it as
  782. 29:37NAD Gateway okay so what is net Gateway
  783. 29:40basically doing it is helping you to
  784. 29:42download the resource from the internet
  785. 29:43and at the same time it is helping you
  786. 29:46to mask the IP address so without
  787. 29:48masking what will happen is again there
  788. 29:50can be a hacker who will know your IP
  789. 29:52address and he will try to do something
  790. 29:53with your network So to avoid that this
  791. 29:56Nat Gateway which is a concept which is
  792. 29:59available along with the ALB like if
  793. 30:01there is elb in the public subnet you
  794. 30:03will create Nat Gateway also in the
  795. 30:04public subnet only okay so NAD Gateway
  796. 30:07is created in the public subnet and what
  797. 30:09NAD Gateway will do is like there can be
  798. 30:11an ad Gateway here NAD Gateway here
  799. 30:13anywhere and what this Nat Gateway will
  800. 30:15do is it will help to download the
  801. 30:16package from internet and at the same
  802. 30:18time it will match the IP address so
  803. 30:20that this person will not know the
  804. 30:21actual IP address of the server or the
  805. 30:23actual address of the application that
  806. 30:25way your entire thing is secure okay so
  807. 30:28these are the different components of
  808. 30:30VPC we have learned a lot of concept
  809. 30:32today now your assignment would be to
  810. 30:34write down all of these components and
  811. 30:37go through the AWS documentation and and
  812. 30:39see whatever I have told you are you
  813. 30:41understanding it or not also most of you
  814. 30:43people know that there is a GitHub
  815. 30:45repository for AWS entire thing that we
  816. 30:48are learning even in that I have created
  817. 30:51a few notes so you can go through those
  818. 30:53notes and you can validate your
  819. 30:55understanding did I understand it
  820. 30:57correctly I have put some reference
  821. 30:59links I have put some diagrams you can
  822. 31:01go through those diagrams and evaluate
  823. 31:03if my if your understanding is correct
  824. 31:05or not end of the day what I would
  825. 31:06expect from today's class if someone is
  826. 31:09watching today's class they should
  827. 31:10understand what is VPC they should
  828. 31:12understand why a VPC is required why did
  829. 31:15I explain this example and how this
  830. 31:18example is correlating with the example
  831. 31:20of AWS VPC
  832. 31:23I hope you understood it I hope I
  833. 31:25explained uh it pretty much in a Layman
  834. 31:27terminology what is the entire flow and
  835. 31:29all when we do the practicals you will
  836. 31:31definitely understand this in an even
  837. 31:33better way right now these are the
  838. 31:35entire things these are the different
  839. 31:36components that are involved in a VPC
  840. 31:38I've covered most of the components if
  841. 31:41not everything there is one more thing
  842. 31:43sorry uh there is one last thing if you
  843. 31:45want to debug this entire thing and if
  844. 31:47you want to understand this entire flow
  845. 31:48of how the traffic is flowing and what
  846. 31:51is happening how many requests have come
  847. 31:52to the VPC and all there is one final
  848. 31:54concept that is called as VPC flow logs
  849. 31:57okay so VPC flow logs also does the same
  850. 32:00thing where it records every action
  851. 32:02whatever I explained like uh here I have
  852. 32:05explained that traffic is going from
  853. 32:06here to here what is happening how which
  854. 32:08server is getting the request so there
  855. 32:10is one particular thing called as VPC
  856. 32:12flow logs which is chargeable so inside
  857. 32:14the VPC there are few things that are
  858. 32:16chargeable there are few things in order
  859. 32:17not chargeable when we do the practicals
  860. 32:19I'll also explain that
  861. 32:21so finally if you found today's video
  862. 32:23informative definitely share the
  863. 32:25feedback with me uh put it in the
  864. 32:27comment section Abhishek I have
  865. 32:29understood this I have not understood
  866. 32:31this I'll really appreciate your
  867. 32:32feedback and if you know someone who
  868. 32:34wants to understand VPC and this entire
  869. 32:36concept please share the video with
  870. 32:38those people thank you so much for
  871. 32:40watching the video If you haven't
  872. 32:41subscribed to the Channel Please
  873. 32:42Subscribe take care everyone see you all
  874. 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.