[00:00:00] I have attended that assignment. So one thing I want to bring to your knowledge, in one question, you have given four options. Out of those four options, two options are exactly same. And the rest of the two are distinct. [00:00:18] yeah so i and for the sake of it's not yet out so that's why i'm not really mentioning that what [00:00:26] the question was but that was the case so and what are the question left in my opinion none [00:00:33] of those are true basically okay so i have randomly what are the option what are the [00:00:44] options are given, in my opinion, [00:00:46] none of those are actually correct. [00:00:48] So, randomly I have chosen [00:00:50] something. So, I consider [00:00:52] that either given... [00:00:53] In that question, right? [00:00:57] Okay. [00:01:02] So, somebody says it is a hint [00:01:04] question. [00:01:07] Yes, Profullah. [00:01:08] What do you mean by hint [00:01:10] question? [00:01:11] there should be [00:01:15] 10 questions wherein [00:01:17] you are expected [00:01:19] to score [00:01:23] so were there [00:01:25] 11 questions [00:01:26] in that assignment [00:01:28] not sure [00:01:31] give me a moment [00:01:33] not an issue [00:01:38] you can just put the question number [00:01:41] which [00:01:42] okay [00:01:46] so just give me [00:01:48] the question number where you found [00:01:50] two options seems to be the same [00:01:52] I will get it checked and [00:01:54] accordingly okay question number 5 [00:01:56] Swaksham Kumar [00:01:58] okay thank you very much [00:01:59] one thing I guess the question number may be randomized [00:02:02] so it may not be exactly same [00:02:04] but you can check yourself [00:02:06] for all the options [00:02:07] oh is it okay at least [00:02:10] can you give me the question [00:02:12] Okay, I'll find it out [00:02:15] Anyhow, thank you very much for [00:02:18] Okay, digital hardware layer [00:02:21] Two options [00:02:22] Okay, got it [00:02:24] Okay, understood [00:02:27] Could be a mistake [00:02:29] While [00:02:30] I'm [00:02:32] Creating the question [00:02:34] By the moderator or somebody [00:02:36] Actually, I have done that [00:02:39] But I just created the questions [00:02:41] And I posted it [00:02:42] I am really not sure how it works internally [00:02:45] the process but [00:02:46] I will take care of that one question [00:02:53] so if that is the case then we need to [00:02:57] score you with nine questions only [00:03:00] we will see [00:03:05] so basically whether you give one mark or you don't consider [00:03:09] that, to me it is one and the same [00:03:12] whatever you people consider then I will do it that way I understand which [00:03:21] question it is in my opinion it's better to give the grace mark to everybody [00:03:27] because people are spending spending time on that okay so if we just remove [00:03:30] that that's from the student side that time is understood understood okay I'll [00:03:36] take care of that no worries okay and second thing I just since we are [00:03:41] speaking about it i just wanted to understand from you did you guys really felt it was worth [00:03:49] an assignment with the quality of questions what was available in it was it a good quality [00:04:00] questions or like no it's normal it's actually i have completed all the assignments for all the [00:04:06] subjects and this is the only subject where i've seen the question is coming very practical so [00:04:10] you have given the practical situation based on that [00:04:12] it's [00:04:13] in my opinion this is a very good [00:04:16] question set [00:04:17] okay [00:04:18] but now the tough or easy that could be relative [00:04:22] from person to person [00:04:24] but we have given some use cases [00:04:26] and asked the question that is a very good [00:04:28] approach [00:04:29] okay [00:04:31] so even for okay [00:04:34] let me ask the question in a different way [00:04:36] has [00:04:37] anybody felt that okay these are all the easiest [00:04:42] questions that's the way I wanted to put it across [00:04:49] so I just wanted to check yes I had to [00:04:53] use my intelligence [00:04:56] or I need to understand the [00:04:59] questions before answering [00:05:03] was it that type of questions or is it like it was straight [00:05:07] and then it was easy [00:05:11] and we could make it. Two types, right? [00:05:16] So, okay. Look, as I said before [00:05:25] I always test my participants only on [00:05:28] what I cover. It's not fair enough to [00:05:32] test you outside of it [00:05:37] but I try to cover the concepts [00:05:40] from the TOC. [00:05:43] That was the objective. Assignment is basically to [00:05:46] concept recalling. That is the thing. [00:05:50] The second one is basically will come up around [00:05:54] next week. I hope all of you [00:05:58] attend that. I didn't want any of you to miss it. [00:06:07] So, as I say, she is not audible. [00:06:09] They probably just check your speakers [00:06:14] If not, please rejoin, that would help you [00:06:17] Yeah, that was the objective [00:06:21] So, one thing I just want you guys to do before we start our session today [00:06:31] Okay [00:06:33] Another thing is, last week I could not make it [00:06:38] I am really sorry for that [00:06:41] Actually, I had to cancel all of my whole week classes after Wednesday. [00:06:47] So I thought I would be able to join on Saturday, Sunday. [00:06:54] No, I have not started the recording yet. [00:06:57] I will do that tomorrow, definitely. [00:07:00] So I thought I would be able to join at least on Saturday, but that also I couldn't join. [00:07:06] So I'm sorry for that. [00:07:08] But as before we start our session today, in all the three sessions what we have concluded, [00:07:20] I want you to recall and identify five words that you feel important. [00:07:29] You choose five words. [00:07:32] That's all you need to choose. [00:07:33] And I want all of you, I want all of you to paste it, paste it in the chat. [00:07:44] I hope everyone has access to the chat. [00:07:48] So you choose five words and put all the five words in a single response. [00:07:53] Don't, you know, put two or three, something like that. [00:07:58] So let's take like a couple of minutes you take, no problem. [00:08:01] I see Sanket, I see Siddhant responding, but you rethink, you rethink, and then try to, don't use, you know, the short forms. [00:08:21] Please use full form. [00:08:25] And let us see what is getting repeated. [00:08:28] The objective is basically to see what is getting repeated the most. [00:08:33] But you don't look at others' response. [00:08:35] You think two minutes and you type yours. [00:08:40] Five words, that's all I would say. [00:08:44] I'm seeing responses. [00:08:45] That's great. [00:08:47] I'll be on mute. [00:08:48] I should be back. [00:08:50] I will be away from the mic for a couple of minutes. [00:08:53] Once we're back, we'll take out from there. [00:08:55] I am seeing already. [00:08:57] Great. What I am very happy about is your thought process is in the right direction. [00:09:13] When I say right direction, I am not meaning that your answers are correct, but your thought process is in the right direction. [00:09:24] Before I speak ahead, I just wanted to confirm. [00:09:27] Is there any background noise you guys are hearing? [00:09:37] Because a lot of noise around my house due to empathy. [00:09:44] So that's the reason. [00:09:47] Okay. [00:09:48] Echo is basically your speaker issue. [00:09:54] That is something that I'm not sure I will be able to help. [00:09:59] is everyone experiencing echo okay fair enough so because to my understanding echo is [00:10:15] from the speaker [00:10:16] so if i have problem with my speaker then i will get echo that's my understanding [00:10:27] coming back [00:10:35] let me try to be a little louder [00:10:38] so that hurts you [00:10:40] let me see [00:10:43] that's what I said [00:10:45] a little uneasiness [00:10:48] that's the reason last week also [00:10:50] I got class [00:10:53] cancelled [00:10:53] I have not uploaded [00:10:58] I will check that [00:10:59] on Monday [00:11:00] I will upload everything [00:11:03] Okay great [00:11:05] So now the point I just wanted to drive here is [00:11:09] There are two things [00:11:11] Okay [00:11:12] One is segregation [00:11:15] And another one is aggregation [00:11:19] So the reason why I asked you to choose five words [00:11:25] Basically, I want to see your thought process [00:11:33] Whether it is applying this aggregation and segregation [00:11:37] I could see some of the answers, yes [00:11:41] But most of the answers is either aggregation or segregation [00:11:47] So now you can look at your answers, your own answers [00:11:52] and you can see whether you have adapted segregation, you have adapted aggregation [00:11:57] or you have adapted both. [00:12:00] It is very important that you need to adapt the segregation first. [00:12:07] In anything, no, I am not sharing any screen as of now. [00:12:12] In anything, whatever you do, first you need to adapt the segregation. [00:12:16] It is not only this subject, it is applicable to anything you do in your professional as well as personal life [00:12:25] First you do the segregation [00:12:28] Once you do the segregation, whatever output you have got [00:12:33] Apply aggregation on it [00:12:36] Then you see the output [00:12:38] You will see the most appropriate output coming from you [00:12:43] this is one thing I tell all my participants [00:12:48] in all my trainings. First you apply [00:12:52] segregation, then you apply aggregation on the output what you have received [00:12:56] when you applied segregation. And then look at the output [00:13:00] when you applied the aggregation. You will be able to see a very clear [00:13:04] picture. It will clear your thoughts. [00:13:09] So that is one thing I just wanted to [00:13:12] give you okay let me give an example so when i asked you to do five choose five words [00:13:23] the first thing what you should have done is no i am not i'm not sharing any screen as of now [00:13:29] okay if that is the case let me share my screen just give me a minute so what i am going to share [00:14:04] now is my fresh sticky notes just for this example and if you are when you are able to see [00:14:13] my sticky note please let me know just ping s when you are able to see the sticky notes [00:14:24] you should be able to see [00:14:45] so we are speaking about [00:14:48] segregation first [00:14:52] and then aggregation [00:14:54] so in our context [00:14:57] if I apply the segregation [00:15:01] I will write something like this [00:15:04] whatever comes to my mind [00:15:07] CPU, memory [00:15:09] storage [00:15:12] motherboard instruction [00:15:17] I will write like this and once I have [00:15:22] done this, this is basically I am [00:15:26] trying to put everything and trying to segregate. [00:15:30] So ISA will be another one group [00:15:34] which will go along with instruction. [00:15:38] CPU memory storage will be one group. [00:15:41] so I am segregating it [00:15:43] now if I have segregated something like this [00:15:47] now I am going to apply aggregation over here [00:15:51] so now if I am going to aggregate [00:15:54] I will see how I can aggregate CPU, memory and storage [00:16:00] so CPU, memory and storage [00:16:05] is there a way that I can aggregate [00:16:09] One way of aggregation is hardware and I can put CPU, memory and storage. [00:16:19] Then I can put software wherein I can say instruction, ISA etc. [00:16:31] Now virtual machine. So now is virtual machine a hardware or a sub-software? [00:16:39] It is a combination of both. [00:16:44] It is a software, but it provides a platform, that is hardware. [00:16:50] So now where will it go? [00:16:53] So it is, you can say, neither. [00:16:58] So there you can put VM. [00:17:01] Now, if you have anything else in your mind, you can just tell, I can give you an example. [00:17:05] So, suppose if you look at the output from the aggregation, it gives you a clarity of what you have got to know. [00:17:17] This is the way you should, okay, sandbox. [00:17:23] Sandbox is basically a virtual boundary. [00:17:29] What is the physical boundary? [00:17:31] physical boundary is the capacity of the hardware or it is if you say CPU there is a boundary to it [00:17:41] that is its size but sandbox is a boundary but it does not have any size there is no size for [00:17:50] the sandbox sandbox can take any number of hardware in it be it virtual physically it [00:18:02] cannot take because sandbox itself is a virtual so where does it go it goes into the nadir so i [00:18:10] can say vm sandbox and if you say rds cloud cloud is a nadir a software that is giving a hardware [00:18:23] so that is nadir so this will always be there in whatever you learn whichever subject [00:18:31] You apply this, you will be able to achieve clarity [00:18:36] For that purpose, we had this exercise [00:18:40] But anyhow, let me stop sharing [00:18:43] Okay, the objective of today [00:18:48] Let me share again [00:18:51] Let me share the same stepping notes [00:18:54] Now let me delete everything [00:18:58] Yeah, sandbox, it's a virtual machine, that's why it goes into the, but sandbox cannot be a virtual machine, only sandbox can contain virtual machine also, that is the difference we need to understand. [00:19:15] So, now objective of today, we are going to deploy an application in cloud and the application [00:19:30] is containerized [00:19:34] and the application is going to have [00:19:40] front-end, back-end [00:19:44] and a database. [00:19:49] So it's a three-tier application [00:19:51] and it is containerized. It is going to be deployed in the cloud [00:19:56] and the deployment is [00:20:00] automatic. What I mean by automatic is [00:20:05] I am not going to manually do anything. [00:20:09] I will have a script which is going to perform that. [00:20:14] So between, with this asset [00:20:17] what we have in hand, between today and tomorrow [00:20:21] tomorrow theory session also, we are going to consume [00:20:25] for this purpose so that [00:20:28] whatever we have covered in the last three sessions, we are doubly sure that we have [00:20:34] understood. Once we cross that, then we are going to see the next set of hardware as part [00:20:45] of our course content. So, are we all on the same page? If you have any queries, please [00:20:53] let me know now. I will be answering that before we proceed ahead. [00:20:58] If someone has any queries, please let me know or if you are comfortable, give me a thumbs up if you have understood. [00:21:09] So is my voice still jumbling around? Okay, great. [00:21:26] So are we all on the same page? Yes? No? [00:21:32] If you have any questions, please let me. [00:21:34] Whatever I have typed here, we are going to use this today, tomorrow. [00:21:39] and then we are going to understand what we have [00:21:42] covered till now. [00:21:45] Okay, so now [00:21:46] Aryaman Singha [00:21:48] Okay, Varun [00:21:50] Okay, this I can help [00:21:53] Okay, great [00:21:54] Which asked me [00:22:00] what was the question [00:22:01] Okay, what are the types of load balances in Azure [00:22:05] and difference between L4 and L8 in the Azure cloud [00:22:09] okay for that okay great okay hope you got the answer [00:22:20] fair enough okay great now what I am going to do is I am first going to share my desktop [00:22:35] that is my laptop. Once you are able to see my laptop, let me know. And then from there we will [00:22:45] start. Actually, I had some issue in connecting using the Teams app. So I connected with the [00:22:54] browser. So just bear with me, it would be a little slower than that. So let me go ahead and [00:23:02] share my entire screen [00:23:04] we will cover that [00:23:09] Rajiv as part as we move ahead [00:23:12] whatever is there we will cover [00:23:13] no worries [00:23:14] serial number is planned [00:23:18] that way but as we [00:23:20] proceed whatever is appropriate [00:23:21] I will take that first and then don't worry [00:23:24] I will get I will cover before [00:23:25] number 30th [00:23:26] everything [00:23:28] is my screen visible can one of you [00:23:31] confirm please [00:23:32] is maybe [00:23:40] chat I have not [00:23:44] I'm not seeing the chat so that's the reason [00:23:47] okay great [00:23:47] so now [00:23:50] if you first take a look at this [00:23:53] I'm going [00:23:55] to open my [00:23:56] git bash [00:23:58] so here I have [00:24:00] let me clear my screen [00:24:03] okay [00:24:05] so this is my git bash [00:24:07] it's basically a shell [00:24:09] using the git and this is the content is basically from my desktop. So if you really [00:24:19] want to see the content in my desktop, so basically I have a directory called [00:24:26] aws order tracing demo. Hope everyone is able to see my explorer. Now under this I have [00:24:37] five directories, one readme file, one five directories, [00:24:42] infra, backend, frontend, queries [00:24:45] and trainer. Now what is there in infra? [00:24:49] In infra I have JSON files, [00:24:54] I have an environmental file, config.env [00:24:57] and apart from that I do have policy templates and [00:25:01] definitions. Along with [00:25:05] that I also have something called deploy.sh. [00:25:09] This is the shell script. [00:25:12] It's basically going to deploy our entire application. [00:25:16] So that's our infra directory. [00:25:20] And the front end has index.html. [00:25:25] And there is a Docker file which is available. [00:25:28] And there is a configuration file nginx.conf. [00:25:32] there is nginx.conf [00:25:35] because I am using nginx for my web service. [00:25:40] Then we have backend. [00:25:42] In the backend I have a Python application source file. [00:25:47] I also have a Docker file [00:25:49] and there is a requirements.txt file. [00:25:54] That is my backend. [00:25:56] And I do have queries. [00:25:58] Basically these are all predefined queries. [00:26:02] Don't worry, I'll be sharing the entire thing in the portal. [00:26:08] So, you don't have to take a note of it, [00:26:10] but try to understand how exactly this application is getting deployed. [00:26:17] So, now using this, all my source and using the deploy.sh, [00:26:26] we are going to deploy the application and then we are going to access. [00:26:31] Once we are able to access, we are going to trace [00:26:34] how the entire request is parsing through. [00:26:38] That is the objective of today's session. [00:26:42] So now I'm going to my PowerShell command prompt. [00:26:47] In my command prompt, I'm in the same directory. [00:26:53] Let me clear the screen. [00:26:54] I'm in the same directory wherein downloads [00:26:57] aws-order-tracing-demo, aws-order-tracing-demo, that's the directory. [00:27:03] Within this directory, if I give, I have all the files. [00:27:08] Now, if I go back to my shell, where am I? [00:27:15] My present working directory is c colon uses sender downloads, [00:27:19] aws-order-tracing-demo, aws-order-tracing-demo, that's where I am. [00:27:24] Now, if I give, there is a bash, that is born again shell. [00:27:29] so unix commands will work so i'm just giving ls minus ls so we are confirmed now that we are [00:27:37] accessing all these files folders from my desktop these are all our source files and source folders [00:27:51] now info is the directory which has the definition for the infrastructure [00:27:56] first let us go there [00:27:59] a little faster please let me know [00:28:06] I can slow down but you understanding this flow [00:28:09] is very important because with that understanding only tomorrow [00:28:12] when we are going to see [00:28:14] today we will be tracing the request tomorrow we are going to see [00:28:18] how the request has utilized the resources [00:28:19] so it is going to be a continuation of today's session tomorrow [00:28:24] now I am going into the infra [00:28:27] and in the infra if I give [00:28:31] there are sorry [00:28:33] ls minus la. So now [00:28:38] there are two executables. One is deploy.sh [00:28:42] and the second one is destroy.sh [00:28:45] and the most important thing is the config.env [00:28:51] file. Now what is there in config.env [00:28:56] file. So when I am going to [00:28:59] use this file, [00:29:04] I am basically setting the environment here. [00:29:08] I am telling export aws underscore [00:29:12] region. Basically aws underscore region is a variable [00:29:16] that is going to be available in my laptop until this [00:29:20] laptop is running. So export is basically [00:29:23] to create the variable and assign the value. [00:29:27] What is the value? Basically, whatever AWS region [00:29:31] is available. So, I am assigning it as ap-south-1. [00:29:37] What is ap-south-1? It is basically Mumbai region in [00:29:41] AWS. So, like that, I am assigning the [00:29:45] variables in this environment file. [00:29:49] And there is a front-end application repository. There is a [00:29:53] backend application repository. So, I am assigning [00:29:57] whatever is the name, aws order tracing demo [00:30:01] hyphen frontend will become the repository for [00:30:04] frontend. For backend, it is aws [00:30:09] order hyphen tracing hyphen demo hyphen backend will be [00:30:13] the repository for backend. So, what is this repository? This is [00:30:17] where exactly our code is going to be stored. [00:30:21] So, from this repository only, we are going to use the image to run our application in the AWS cluster. [00:30:35] Now, application name, cluster name and the table name. [00:30:41] What is this table name? [00:30:42] I am going to use DynamoDB as my database. [00:30:45] So, what should be the name of the table? [00:30:48] It should be app name hyphen orders. [00:30:51] okay now like we have a repository for frontend and backend when this application is going to run [00:31:01] then that application needs to log the activity for that we have frontend log group and [00:31:09] backend log group basically this is the variable and the value is here so basically aws order [00:31:17] tracing demo slash back-end will be the log group for back-end application then you also have [00:31:27] front-end target group back-end target group same way you have I have hashed this so this is not [00:31:39] going to be executed when we are going to source this environment file to my windows [00:31:44] basically it will go to this shell [00:31:47] so whatever is hashed is not going to be executed [00:31:51] and now I am leaving all these variables [00:31:55] empty because it is going to get the information [00:31:58] while it is running [00:32:01] ok fair enough [00:32:04] now where are we going to use all these things [00:32:09] we are going to use [00:32:13] this from our [00:32:16] from our laptop. [00:32:23] This is the shell which is running in my windows. [00:32:28] I can look at this even from my [00:32:31] command prompt or I could have also looked at [00:32:36] these contents from this info directory. I could have right clicked [00:32:40] I could have said open, open with [00:32:44] probably I want it to open with notepad [00:32:49] I could have opened it. You could have seen the same content but [00:32:53] I want you to get utilized to the shell. I want you to [00:32:57] get utilized to the shell so that because most of the [00:33:01] cloud environment, the preferred operating system is Linux. [00:33:06] So that's the reason I'm using this git bash [00:33:09] though it is my laptop. Okay fine. [00:33:13] Now, where will it get all these values? [00:33:18] For example, this is any app. [00:33:21] It has been set hard all the well, but app name also is set. [00:33:30] Where are we going to use all these things? [00:33:33] We are going to use all these variables in our deploy.sh. [00:33:39] wherein we are going to deploy our application into the aws environment since it is container [00:33:46] we will be using ecs we are not using eks but we will be using ecs i chosen ecs because [00:33:56] eks you will get opportunity to see in our cloud sessions but ecs is something that [00:34:05] not be covered generally so that's the reason i have taken i have opted for ecs in this session [00:34:12] now so there is said that the deploy.sh is what we are going to deploy yes now let us go ahead [00:34:22] and see let me open it in nano i'll just say deploy.sh when i'm opening it nano i have a [00:34:32] ability to move up and down for you to explain and that's the reason. [00:34:37] So, the environment what we are going to use is bash, that's what we have set here. [00:34:44] And the scripted directory, this script where it is, this is what it is going to. It is going to [00:34:50] get the directory name source of zero and a pwd hyphen w. pwd is nothing but present working [00:35:00] directory. The account ID. Where is it going to get the [00:35:04] account? Account ID of the AWS. [00:35:07] So, I am going to run this command. Whatever this [00:35:11] command is going to give as an output, as a [00:35:15] text, that will be assigned to the account ID. [00:35:19] And we will get to know what it is [00:35:21] using. We will get to know because we do have echo commands. [00:35:30] then we are going to discover the VPC [00:35:33] in this account [00:35:35] whichever account we are going to use [00:35:38] we are going to discover the VPC [00:35:41] further we are going to use the AWS client [00:35:45] CLI command [00:35:46] AWS EC2 describe VPC as filter name default [00:35:50] so default whatever is the VPC [00:35:54] will get outputted as text [00:35:56] and it will be assigned to the VPC underscore [00:36:00] id variable then subnets if it is there it will read it if it is not there it will create [00:36:10] could not discover a default vpc with two default subnets and it will exit in case if it is not [00:36:19] able to create this is the message it is going to give and it will come out so first is we are going [00:36:25] to discover the BPC. The second step is ECR. ECR is nothing but container repositories in AWS. [00:36:36] So there we are going to get a repository created for our application in the same region [00:36:44] where the application is going to run and we are going to use that repository under the account ID [00:36:52] to store our docker images. [00:36:57] So now we are trying to get the login password [00:37:00] of this particular region. [00:37:02] And then we are going to use the docker login username [00:37:05] for the AWS and standard input, $ECRBs. [00:37:11] So now we have created the repositories. [00:37:15] Then we are going to build and push images. [00:37:18] Where is it going to build? [00:37:21] If you remember, we have seen Dockerfile in both frontend and backend. [00:37:27] So, we are going to use those two Dockerfile to create our frontend container and backend container. [00:37:36] So, two containers we are going to create and we are going to create two images from those. [00:37:43] And then we are going to push those images to the identified repository. [00:37:51] So, that is step three. [00:37:53] Step 4 is basically, we are getting into the lowest tier in the tree tier, which is that the database tier. [00:38:03] Here we are going to use a DynamoDB table. [00:38:07] And this DynamoDB table is going to hold our data. [00:38:15] Okay, fair enough. [00:38:16] so now if not create [00:38:21] you can go through this script in detail [00:38:24] because I will be sharing this script in a format of zip file [00:38:28] in your portal so don't worry [00:38:30] you can go through this in detail [00:38:33] how are we building and what are we building [00:38:35] and how are we pushing [00:38:37] you can go through each and every line in detail [00:38:40] and modify to your requirement also [00:38:44] not a great deal [00:38:46] So now, step four, DynamoDB table, we have created. [00:38:55] Now, we want to capture the logs from the application once it has been deployed. [00:39:04] So all the transactions we wanted to. [00:39:07] So LG is nothing but the log group. [00:39:12] So front-end log group, back-end log group, both we are creating. [00:39:17] And then we are going to assign the IAM role. [00:39:20] and the trust policy. [00:39:26] Once we assign, if you look at it, [00:39:28] here we are using the AWS CLI command. [00:39:33] For example, AWS IAM, get hyphen role, [00:39:38] hyphen hyphen role hyphen name. [00:39:41] What is the name of the role? [00:39:43] Exic role. [00:39:44] Where is it? [00:39:45] It is just above. [00:39:46] If you look at it, you have the app name, [00:39:49] hyphen execution role. [00:39:50] that's what it will take the value here and then [00:39:55] assume role policy document [00:39:58] we have a file called trust policy [00:40:02] file. So whatever is available in this [00:40:06] it is going to assume because we need access permission [00:40:10] to create container service, run our container [00:40:14] in it and then access the application. For that we need [00:40:18] permission. What all permission is needed has been mentioned [00:40:22] in this trust policy file. It will take the input [00:40:26] from the trust policy file and then it is going to assume that role. [00:40:31] It's the same thing that we are doing [00:40:37] for both tasks, frontend and backend. [00:40:44] And once we are done with the IAM [00:40:47] roles, you can see here task policy file is nothing but [00:40:51] cat slash TMP backend task policy. This is for the [00:40:55] backend. Same you will have the task policy which [00:40:59] is for the frontend also. And where is it? [00:41:03] This is we are creating temporarily by using [00:41:06] the information on the JSON file backend task [00:41:11] policy dot JSON which will get applied and written [00:41:15] in this JSON file and that JSON file [00:41:19] will be assigned as a task policy file which will be used in our attach role, get role [00:41:28] and for both back end and print end. [00:41:32] And after performing the IAM roles, we are going to create a ECS cluster. [00:41:42] It's a container [00:41:43] cluster. [00:41:45] Containerization [00:41:46] cluster. [00:41:47] And [00:41:48] am I [00:41:49] telling [00:41:50] how many [00:41:52] has to be [00:41:52] created? [00:41:53] No. [00:41:54] I'm defining [00:41:55] some values [00:41:56] in terms of [00:41:56] the groups [00:41:57] and other [00:41:57] stuff. [00:42:01] But I'm [00:42:01] leaving it [00:42:02] to the [00:42:02] AWS [00:42:03] to decide [00:42:04] in terms [00:42:05] of number [00:42:06] of nodes [00:42:06] and other [00:42:07] things. [00:42:09] And [00:42:09] finally, [00:42:10] security [00:42:11] group for [00:42:12] the front [00:42:12] end and [00:42:12] security [00:42:13] group [00:42:13] for the back end. Then we are going to reset [00:42:17] or add simple demo ingress. [00:42:21] Duplicate rule errors are ignored. So we are [00:42:24] authorizing the security group for incoming [00:42:29] traffic. Ingress means incoming traffic [00:42:33] and we are doing it for front end as well [00:42:37] as back end. And we also have application [00:42:41] load balancer. Balancer also will have the same security [00:42:48] group. So the policy is uniform across [00:42:52] ALB, frontend and backend. And after that [00:42:56] we are going to create a load balancer, application load [00:43:01] balancer. And once the load balancer is [00:43:04] created, if you look at all the values, most of them are [00:43:08] variables. Most of the variables are defined in our [00:43:13] environment file or it will drive while [00:43:17] processing the deploy.sh file. Finally, [00:43:21] the target groups. We will create the target group [00:43:25] and we will put the systems in it. [00:43:30] When I say V, it's not V, it's actually the [00:43:33] AWS. Now, finally, we are going to create [00:43:37] an API interface wherein which is going to [00:43:41] confirm whatever [00:43:44] request can enter [00:43:49] and nothing is allowed. That is what we are [00:43:53] defining here. And then we are [00:43:57] deploying the applications. That is what nothing but [00:44:01] create or update services. [00:44:05] All are local existing and finally if not existing [00:44:09] then create the cluster service. [00:44:14] If it is already existing, ignore it and move forward. [00:44:17] Create or update the service and waiting for the [00:44:21] ECS services to stabilize. [00:44:26] So now it has used the images [00:44:29] to create the containers. Now it is waiting [00:44:33] for the cluster to come up. Once the cluster comes up, we will get [00:44:37] the URL to access [00:44:39] the application. [00:44:42] So this is what is this [00:44:43] entire shell [00:44:45] script is all about. [00:44:47] And this is just a sample file. [00:44:49] It includes [00:44:50] all three tiers [00:44:53] of application deployment. [00:44:56] So it [00:44:57] should serve as a good [00:44:59] example for you. [00:45:01] And if you wish, you can use this [00:45:03] as a base and expand more. [00:45:06] Or you can even [00:45:07] recreate a fresh one. It's your choice. [00:45:10] So now I have this deployment dot, sorry, deploy dot sh. [00:45:16] In deploy dot sh, we also [00:45:19] saw some policy related and [00:45:23] task related. So I have front end task definition [00:45:27] dot json. I also have [00:45:31] iam task trust policy dot json. [00:45:35] so this is the template and this is the actual [00:45:39] value when deployed okay fair enough [00:45:44] now let us see I can give [00:45:48] AWS is a CLI command I can ask [00:45:52] what version do you have so it has [00:45:56] 2.26 pattern 3.13 [00:45:59] windows version 11 and it's an AMD 64 [00:46:04] okay perfectly fine now do i have docker running yes i can also check that i can say docker [00:46:18] version so it says that yes docker is running and it has a version 29.7.2 but where is this [00:46:28] docker running, Sundar. I am using docker desktop. So, if you can look at here, I am using a docker [00:46:36] desktop. I have started the docker desktop and I have just left it running in the background. So, [00:46:41] I am able to run the docker command in my bash. So, my AWS is configured, docker is configured [00:46:50] and we also have the application package okay and we can see again just for our [00:47:07] refresh where am i in info my package is not in info it is in frontend and backend [00:47:17] so now first let us look at the frontend CD frontend in this frontend I have [00:47:27] three files one is docker file another one is index.html and the third one is [00:47:33] a configuration file let us look at docker file so here my docker file says [00:47:40] that from ngimx colon 1.27-alpine so basically from this image copy ngimx.conf into the [00:47:55] and overwrite different .conf copy index.html from the current directory [00:48:01] to the index.html under usr share nginx and html. [00:48:08] So, this is what I have in the docker file. [00:48:12] So, if I am going to create an image using this docker file, [00:48:16] then that will help me to do all these three activities. [00:48:21] And further, it will exposure the application at port number 80. [00:48:25] It is a web service. [00:48:27] So, we are exposing the port number 80. [00:48:29] So, the application is going to be available at port number 80 in that particular container. [00:48:36] So, if you are running more than one front-end container, then definitely yes. [00:48:43] All of them will open up the port number 80 and the application will be running inside the container. [00:48:51] And inside the container, once it is created, index.html also will get updated. [00:48:57] it will replace the default HTML5 [00:49:02] and it will expose the code number 8. [00:49:07] This is for the front end. [00:49:10] But for the back end, what is that with the term? [00:49:16] Let me say back end, Docker 5. [00:49:20] You can see, I am starting with Python. [00:49:23] My back end application is a Python application. [00:49:27] And I am setting the environment for that application to run and I am also giving steps for creating that image. Once the image is created, you can use that image and run the container in your ECS environment. [00:49:46] so here I am also [00:49:49] having app.py [00:49:53] so index.html we know what it is [00:49:58] we have seen all other files except for [00:50:02] requirements.txt and app.py [00:50:06] so where are these [00:50:09] files available [00:50:10] it is what we are looking at is at the back end [00:50:15] So, let us see if it is having these two files in the backend directory. [00:50:21] So, let us ask backend. [00:50:24] Let me say requirements.txt, it is there. [00:50:28] So, basically, it brings in the flask, [00:50:33] Givni Khan and Boto, that specific question, part of the image. [00:50:41] That's why we have put requirements.txt. [00:50:43] See, this is very much required for the container to run successfully. [00:50:48] Now, requirements on what is there in app.py. [00:50:53] Let us see what is there, backend, app.py. [00:50:58] Oops, it's running. [00:51:00] So, instead of cat, let me see more. [00:51:05] Oops, it's not there. [00:51:08] Okay. [00:51:10] Let me use nano. [00:51:12] so here if you look at this is my python file [00:51:17] so I am importing login [00:51:21] because we are going to log [00:51:22] operating system [00:51:24] we are going to use operating system commands [00:51:27] time and UID [00:51:29] so we are also going to use [00:51:32] go to 3 [00:51:33] so this is the entire process [00:51:37] first thing it is going to [00:51:38] check if your application is running [00:51:41] asking you to check in slash health [00:51:44] and if it is healthy [00:51:48] then return that it is healthy [00:51:50] then API orders [00:51:53] basically the orders that we are going to post into the application [00:51:57] of what we want [00:51:58] is handled by this [00:52:01] slash API slash orders [00:52:04] then I also [00:52:07] have options that in case of [00:52:11] normal [00:52:12] failure and slow [00:52:14] and [00:52:16] this is the actual [00:52:18] application [00:52:21] now this is [00:52:23] get order information [00:52:26] whatever has been [00:52:29] inserted and confirmed [00:52:30] will be displayed on the screen [00:52:33] with this get command [00:52:35] and it is also [00:52:37] going to give a detailed [00:52:38] logging information [00:52:40] in case if it is a warning or if there is an error or if there is something [00:52:45] critical and that is going to display here [00:52:49] in this part of the code and [00:52:53] finally it is going to say that the application is running in this [00:52:57] code post and in this code number [00:53:00] so if this deploy.sh the sales script [00:53:04] if it is going to be successful then we can [00:53:09] expect the URL in which we can [00:53:12] access it. [00:53:15] Okay, great. So let us [00:53:18] come out of this script we have understood. [00:53:22] Now can we go ahead and execute this script? [00:53:25] Yes, we can. But before that, [00:53:29] I just wanted you to confirm [00:53:32] that what is that we are [00:53:37] So, I can ask AWS to give me the information about the account that we are going to use for this particular deployment. [00:53:54] So, AWS, STS, get caller ID, caller identity. [00:53:59] So the user ID is this, account is this [00:54:06] and we are going to use the result root [00:54:09] to deploy this application. [00:54:15] We know where exactly the application is [00:54:18] and how it is going to run as well. [00:54:22] Now, let us also check [00:54:26] what is the default region which is set for my environment. [00:54:32] i can ask aws to actually configure do you want to configure and set anything no i want to get [00:54:45] the configuration that is already set for region so ep-south-brown so this [00:54:56] region name and the region name what i am using in my deploy.sh both are matching [00:55:03] if these two are not matching then I will not get [00:55:06] permissions and [00:55:09] even if it is not matching well and good [00:55:12] but only thing we need to know where we have [00:55:15] to give the region information so that [00:55:17] the application is appropriate [00:55:20] other than that there is no much [00:55:24] significance of what region [00:55:27] by default this system have access to [00:55:30] still you will be able to assign [00:55:32] access to, to whichever [00:55:36] system we are logging in. So now [00:55:40] the AWS environment also [00:55:43] we are clear. We are going to use AWS [00:55:47] south one to create our container [00:55:51] service. Our DynamoDB is going to run [00:55:55] in that region and our backend application also is going [00:55:59] to run in the same region. So all the three tiers [00:56:03] will be running in the same region because the access [00:56:07] what I have provided for the application is matching which [00:56:11] the environment for which we have access to. [00:56:15] Since these two are matching, we will not have any challenges as such. [00:56:20] So now it's time for us to [00:56:22] go ahead and deploy. So how [00:56:27] am I going to deploy? Let me clear the screen. Where am I? I am in AWS order. Now I can run the script. [00:56:42] Basically first I need to source the environment. Where it is available? It is available in [00:56:50] config dot environment source is a unix command in case if you are not aware [00:56:57] it's just going to source the information from this file and set the environment [00:57:02] for my shell because i have logged in and got a shell only for this shell it will be applicable not [00:57:10] all the shells so yes it is applied the response is very fast that means it is applied and [00:57:20] awaiting for the next steps. [00:57:24] That's what it means. [00:57:25] Now, I have sourced it. [00:57:30] Now it's time I have set my environment [00:57:32] in this particular shell. [00:57:35] The shell, where is it running? [00:57:36] Keep in mind, this shell is running in my laptop. [00:57:40] From here, we are going to connect to the AWS. [00:57:44] We are going to deploy our application. [00:57:47] We are going to create our database. [00:57:48] and then we are going to create a load balancer [00:57:54] and assign an external IP to the load balancer [00:57:57] and the same will be accessed from the outside. [00:58:01] We should be able to see how it is traveling [00:58:03] until the database and the response, [00:58:05] how it comes back to the end user as well. [00:58:09] So to know that, first we need to deploy the application. [00:58:13] So what I'm going to do is, [00:58:14] I'm just going to run my deploy.sh. [00:58:18] Let me take a minute or two. Let us actually wait for it. How am I going to do that? I'm just going to run the deployment. [00:58:40] so i'll just say bash that's my environment even if i don't give bash it is going to use the bash [00:58:49] because my default selfish bash and it's always a good practice to provide so using bash [00:58:56] execute the file that is available under the directory infra from the current directory [00:59:04] and the script name is deploy.sh [00:59:08] so now first what it is going to do [00:59:12] let me give enter, so first thing what it is going [00:59:16] to do is it has identified the account in which it is going to deploy [00:59:20] it has also identified the region in which it is going to [00:59:24] deploy, it has also identified the VPC in [00:59:28] that account and subnets which [00:59:32] two subnets it is going to use and now it is proceeding. [00:59:39] What it is proceeding with? First it is using the front-end Docker file and then it is creating [00:59:47] the image. Where is it creating from? It is creating from the front-end directory [00:59:55] from the file Docker file and it has created the image. It says that view build details is [01:00:01] available in my desktop dashboard build desktop linux desktop linux and this particular image id [01:00:09] we have the repository sorry the image front end similarly it is trying to create [01:00:18] for the back end somewhere you see layer already exists that means it is [01:00:25] there is an image available but still it checked the layers one more layer was missing [01:00:30] and it has pushed that layer also into the same back-end [01:00:34] image. Now [01:00:37] it has pushed it to the repository. Now from [01:00:42] the repository, how do I know? After building the images [01:00:46] it has pushed to the referred repository. This is [01:00:50] what the repository is, my account, docker.ecr [01:00:55] if you have in Southland, that's the region [01:00:58] amazonaws.com and my name of the [01:01:02] application with the demo backend. So it has pushed [01:01:06] this into this repository [01:01:10] successfully. Now it is actually [01:01:14] trying to create the layers. It is [01:01:18] trying to create the cluster. Once the cluster is [01:01:22] available, it is going to push the [01:01:26] pull the images and run the application in that cluster. [01:01:32] So it is waiting for the ECS service to stabilize. [01:01:35] That means it is in the process of creation. [01:01:38] And it is waiting for it to stabilize so that it can deploy the container and give us the URL. [01:01:46] So it may take another minute or two. [01:01:48] So let us wait. [01:01:52] Because everything is happening using the AWS CLI command. [01:01:57] all related to the cloud, we have used [01:02:01] the CLI command format to create in this particular account. [01:02:06] So, in the meantime, [01:02:09] we can also go ahead and see. [01:02:13] In my... [01:02:15] So, let me bring up the [01:02:22] console, AWS console, while it is [01:02:26] waiting for it to happen. Now, this is my AWS [01:02:30] console. I have not touched the console [01:02:34] at all for any of the resource creation or application [01:02:38] deployment, but I'm going to use the console [01:02:42] to understand if [01:02:44] things are being taken care of. So now let [01:02:50] us check the VPC. That's the first thing I checked. [01:02:54] So what is my default VPC? How many [01:02:58] VPCs are running in Mumbai, one VPC is running [01:03:01] and that ends with one, two, three. [01:03:06] And if I get into the VPC ID, I'm able to see [01:03:10] that there are three subnets. But our script [01:03:14] we have told it to identify only a VPC that has [01:03:18] two subnets. So definitely it will choose [01:03:22] this. I don't have any other VPC running. So it will choose this because [01:03:26] it has three subnets. So, Sundar, what if it had [01:03:30] only one subnet? Then it will not choose. [01:03:34] If you remember, to communicate that only we had [01:03:38] the error message in our script. Saying that, [01:03:42] I am not able to find a VPC with two or more [01:03:45] subnets. And it also has a routing table. [01:03:52] So, now let us go back and see what is happening here. [01:03:56] Now, it has waited for the ECS service to stabilize. [01:04:01] Okay, great. [01:04:03] Now, let us now go to the ECS. [01:04:11] So, ECS is accessed before I used it for the previous demonstration. [01:04:17] So, now ECS, I am opening it up. [01:04:21] So, now you can see that there is a cluster created by name AWS. [01:04:27] order-tracing demo cluster. [01:04:30] There are two services running, two tasks. [01:04:35] Zero container instances. [01:04:38] As of now, nothing is, no request is there. [01:04:41] So, no containers. [01:04:42] CloudWatch is monitoring. [01:04:45] And capacity provider strategy. [01:04:47] I have not given any default capacity. [01:04:50] I left it to the AWS intelligence to run my containers. [01:04:54] containers. Now if I get inside this cluster, what will I be able to see? I am able to see [01:05:03] two things. One is front-end service and another one is back-end service. So what is this? [01:05:10] This is basically service name. So that means even though we have only one container, there [01:05:17] is a service name for that container has been created. This means that we can run as many [01:05:23] containers as we want under this service name. It will get redirected to multiple [01:05:31] Docker files, sorry, multiple Dockers and Dockers will successfully process the request [01:05:40] and provide a feedback back to the request. So, we have two different services inside [01:05:49] this and actually we have used the express mode in the aws cli environment so that's why we have [01:06:00] this okay now we say there are no ec2 instances are running yes only cluster is running no other [01:06:08] instances are running so we confirm that let us we let us go to the ec2 instances [01:06:18] So now there are no instances running. I am still in Mumbai region. There are no [01:06:28] instances running but my application is deployed and application is live and [01:06:33] application is accessible. How can I confirm that my application is [01:06:42] accessible? I can go to the application load balancer. The application load [01:06:54] balancer what we have received post deployment is available here so that means my application is [01:07:01] available in this url of the application load balancer okay great so now let us open a new [01:07:14] window but my new window is visible to you guys now let me go ahead and paste [01:07:24] So, I'm just going to paste, not paste and go. [01:07:27] Paste and go will actually execute the URL. [01:07:31] So, now you just look at it. [01:07:34] Amazon AWS dot com. [01:07:37] ELB. [01:07:38] So, load balancer. [01:07:40] Elastic load balancer. [01:07:42] It's available in region AP South 1. [01:07:47] And this is my application name. [01:07:51] And this is my application load balancer. [01:07:54] and this is the ID of the load balancer. [01:07:57] This is how the URLs get constructed in the cloud. [01:08:02] So now basically our AWS order tracing demo [01:08:06] is running under this ALP [01:08:09] and this ALP will be able to access [01:08:12] the containers that are running in this region. [01:08:17] As of now, how many containers are running? [01:08:19] There are two. [01:08:20] One is for frontend and another one is for backend. [01:08:24] Okay, fair enough. [01:08:26] Now let me go back to AWS home page again. [01:08:32] And we have seen the ECS. [01:08:35] And let us look at the DynamoDB. [01:08:37] Because DynamoDB is our database. [01:08:41] So now let us look at this database. [01:08:45] Let us look at this table. [01:08:47] How many tables I have? [01:08:49] I have only one table. [01:08:50] This is the table which got created as part of the deployment. [01:08:54] so aws order tracing demo orders is the table [01:08:58] I can get into this table [01:09:01] and now in this table [01:09:04] I have all the configurations [01:09:08] related to this table [01:09:09] but how do I see the content of this table [01:09:13] I can ask it to explore the table items [01:09:17] with this option [01:09:18] whether you want to scan or query [01:09:21] scan means the whole table [01:09:23] Query means very specific query you wanted to run and find out [01:09:28] whatever data we have in a specific table, yes or no. [01:09:33] Okay, great. [01:09:34] Let me go ahead and scan. [01:09:36] And then ask it to run the scan. [01:09:39] If you look at it, there is one already it has. [01:09:46] So let me rerun it. [01:09:48] Yes, it is rerun. [01:09:49] It is giving me the same. [01:09:50] now I can get into this order ID and I can see what is the values so partition [01:09:59] key is order ID customer product quantity and status conformed now let me [01:10:08] go back to explore items I can run how many hour times that's what is going [01:10:15] it says quantity is to status is confirmed product is basically EKS training so now [01:10:28] let me click on this you'll be able to see what is available under this now will I be able to see [01:10:38] this in the web browser through the front-end application yes we have copied the url in which [01:10:47] the application is available now you can see it's and not secret because i'm running [01:10:55] http and not http yes it's an open url but anyhow i'll be removing all the resources from the aws [01:11:04] then knowing this or not knowing this is not going to make any [01:11:08] difference. So now the [01:11:10] homepage has come, AWS Order Fulfillment [01:11:14] Sundar AWS EKS Training 2 [01:11:17] It is waiting for an order [01:11:20] If you place an order, then the order details will come [01:11:24] in this small window. Now let me say [01:11:28] customer is not Sundar, but the customer [01:11:32] is SHIM. They have not asked [01:11:36] for EKS training. They have asked for [01:11:40] GCP GKE training. [01:11:45] Now, how many people are going to attend? [01:11:48] Let us say 20. Now, let me place the [01:11:52] order. It's a simple application. The moment I place the order [01:11:56] you can see HTTP status is 201 [01:12:00] one. Duration it has taken is [01:12:03] 5 milliseconds, not more than that. It has created the [01:12:07] order ID. And there is a request ID also. [01:12:12] The request ID that is requested to create [01:12:15] this order and hence we get the order ID. [01:12:20] And based on the order ID, we will [01:12:22] track the transactions from that order ID. [01:12:27] okay so as you can see that there is a request id for this creation is something like [01:12:35] muijifdf there is a name it has given there is a prefix of equalizer that is eq [01:12:46] so now how do i see this order where this order should be visible just keep an eye on this [01:12:55] the reference number or the reference [01:12:57] ID. I will [01:12:59] go back. I will [01:13:03] also look at DynamoDB. [01:13:08] I will go back to the dashboard [01:13:11] under tables. [01:13:15] Sorry, tables, under tables. [01:13:22] I can also explore the [01:13:25] table items like before. I am just going to ask it to scan [01:13:29] all, but let us see. There is only one as of now, so [01:13:33] let me rerun it. Now you can see that [01:13:36] the order has come. One is AWS, the default. [01:13:41] Second is Sunder. The third is Shand. Basically [01:13:45] customer name. I am just giving something so that [01:13:50] we can identify it. Product is GCP, GKE [01:13:56] training, 20 quantity. Earlier we added 2, now it is 20 and the status is confirmed. [01:14:05] So now how this is traced, that is what is the main question. So let us copy the request ID first [01:14:20] here. It's basically [01:14:23] REQ. It's not just key. It is [01:14:26] REQ. Let me keep this in the [01:14:29] memory. Now [01:14:32] let us now [01:14:36] trace the request. [01:14:38] So now let me go back to my [01:14:41] console and where we can get [01:14:45] the logs for this. [01:14:48] Basically a service called [01:14:50] monitoring. Under that, we have CloudWatch. [01:14:55] So, okay. [01:15:01] So let me use [01:15:04] CloudWatch. So yes, it is there. [01:15:09] I can monitor resources and applications. It's a feature in [01:15:12] AWS. Now I'm accessing [01:15:16] CloudWatch because I have configured my application to be [01:15:21] monitored by CloudWatch for its logs. [01:15:25] Before we go ahead and look at the log analytics and understand [01:15:29] the sequence of events that has happened, from the time I [01:15:33] had given a request on this browser until the time I [01:15:37] get a response, that is what we are going to see next. [01:15:41] Because I got this response, it confirmed that my [01:15:44] request has been created in the database. We also saw in the [01:15:49] database but how the response is going to go through. Now I'm in the cloud watch, I'm in the [01:15:57] log analytics but before going ahead with this I just wanted to check if there are any queries, [01:16:05] questions. Let me first go ahead and stop sharing so that you can also see if there are any queries [01:16:14] in the chat or anything in the q&a uh if you wanted to ask something you can also raise your hand [01:16:24] yes suraj i'm allowing you please let me know uh hello sir uh if someone has this folder that you [01:16:34] shared on your git or local folder so what uh what uh what service he has to avail from the aws [01:16:42] In the last lab, we have set up the EC2 instance in tier 2 micro. [01:16:48] So how we connect the same instance. [01:16:51] And if we don't have an AWS account, [01:16:55] we just simply got your folder in our local system through our zip file [01:17:00] and extract it. [01:17:02] So it will work with it and what will be the pay requisite [01:17:05] we need to set up on AWS first. [01:17:08] You need to have an account. [01:17:11] That is the pay requisite. [01:17:12] And that account should have the billability information. [01:17:19] For the resources that I am using, AWS should be in a position to charge me. [01:17:25] Only these two are the three requisites. [01:17:29] And sir, can you show us the file where it will connect to our local, to the AWS file? [01:17:35] Because all the code is in our local system and it is connected to the AWS. [01:17:40] I showed them the credentials. [01:17:44] Okay, let me share my screen quickly. I'll show you that. [01:17:48] Let me share my entire screen. [01:17:52] So now, I go back here [01:17:56] into my shell, which I have used [01:18:00] to deploy. So now [01:18:04] let me open the deploy.sh [01:18:08] Where is it available? It is available in, sorry, it is available in info directory and I am opening here. So now, it needs to know which account to use, what should be the authentication information and how to connect. This is what you wanted to understand, am I right? [01:18:33] sorry [01:18:42] yes [01:18:45] I'm looking for the same file [01:18:47] yeah yeah [01:18:49] so here if you look at it [01:18:50] this script directory [01:18:53] and if you [01:18:54] okay not here [01:18:58] I opened the wrong file [01:19:00] I need to show you the [01:19:02] environment file [01:19:03] so now [01:19:04] what is the environment, config.environment. [01:19:09] So here if you look at it, AWS region, [01:19:13] I am setting it APSouth, [01:19:16] and admin, and the cluster which I am going to create, [01:19:20] everything. [01:19:22] But where will it get all this information from? [01:19:25] I can ask the client in my system. [01:19:30] I have installed AWS CLI in my system. [01:19:33] I can ask how do I confirm that AWS CLI is installed [01:19:38] AWS-F1 version that confirms that [01:19:42] the CLI is installed in my system. And now here [01:19:46] I can go ahead and type [01:19:49] okay, it has gone beyond. Okay, so basically [01:19:54] this is the command I'm going to type. Because in this client [01:19:58] I have set my user account [01:20:01] the identity that I am going to use, [01:20:06] the authentication information is all set in my desktop [01:20:09] itself. When the AWS client is going to run an AWS [01:20:13] command, then it is going to use all this information that I have [01:20:17] set it in the AWS client software. [01:20:21] So let me go ahead and paste this. Now if [01:20:25] you look at the outcome that it is showing, basically [01:20:29] this is the user id nothing but my account id and this is my account and the user name that i'm [01:20:40] going to use is root it will not show the credential of what it is going to use but [01:20:49] this client has already been set with this information the moment i go ahead and use the [01:20:57] deploy.sh. Here, if you look at it, [01:21:02] a co-aws account is basically [01:21:05] account ID. Where is this [01:21:09] account ID is going to come? This account ID is going [01:21:13] if you look at the config.environment file, [01:21:17] I would have given that aws.sts command and I have taken the [01:21:21] ID from there. Region, I have set in the environment. [01:21:25] Now whenever it is going to run any AWS command, for example, if you look at it, it is running this AWS EC2 command. At that point of time, it is going to use this account. And within this account, it is going to see which subnets are available, under which VPC ID. [01:21:49] so inside this deployment ship [01:21:53] deployment [01:21:54] shell script I have all the [01:21:56] AWS client commands [01:21:58] running but [01:22:00] setting it is going to get it from the [01:22:02] AWS CLI environment [01:22:04] that we have seen giving the [01:22:06] AWS STS command [01:22:08] did I answer your query [01:22:10] or did I confuse you more [01:22:12] yes yes [01:22:14] yes I got it [01:22:15] understandable thank you [01:22:17] okay [01:22:18] okay fine [01:22:22] fair enough anything else from anyone [01:22:26] before we move ahead [01:22:28] let me stop sharing [01:22:29] what is that [01:22:32] okay I stopped sharing [01:22:33] so now [01:22:35] I do see [01:22:37] Varun Agarwal [01:22:40] so I am opening your [01:22:41] mic [01:22:44] so please let me [01:22:47] hi sir good evening [01:22:48] I have three questions [01:22:51] first is about that ARN [01:22:53] when you did AWS STS [01:22:57] it shows your [01:22:59] username, it shows your account [01:23:01] something and then it shows [01:23:03] an ARN [01:23:04] and it says ARN colon AWS IAM [01:23:07] some something, some number and then root [01:23:09] can you explain a little bit about that [01:23:11] and is it related to some type [01:23:13] of a privilege [01:23:14] mapping or something like that [01:23:17] no [01:23:19] not really [01:23:21] just one minute, someone has asked me to increase the font [01:23:25] so that it is visible, I have just increased the font size [01:23:29] hope it is visible, okay, so now I have given this [01:23:33] command, okay, where is this command getting [01:23:36] executed, it is the CLI command, like your [01:23:40] copy command or move command which is for the shell [01:23:44] this AWS command is also part of the shell now because I have [01:23:49] installed AWS client. So AWS command [01:23:53] is available to me. But if I am going to install any client [01:23:57] for example if you are installing an Outlook client [01:24:00] you are supposed to give the properties that to which exchange server [01:24:04] it is supposed to connect. What should be the credentials that it should [01:24:08] use so that it can connect with the exchange server [01:24:12] and get your mails or send your mails or etc etc. [01:24:16] Similarly, when you are going to configure your AWS client, [01:24:23] you are supposed to give this information along with the identity. [01:24:29] Now I will show you. [01:24:31] Your screen has not changed. [01:24:34] Your screen is not shared yet. [01:24:36] Sorry, sir. I interrupted you. [01:24:38] No problem. [01:24:40] Let me share the screen first. [01:24:42] there is something very basic for what we are going to see tomorrow [01:24:47] so please ask questions, don't think that it is very basic [01:24:51] can I ask or I cannot ask, that's not going to help you [01:24:55] ok now AWS [01:24:58] has a subcomment called configure which will help us to configure the client [01:25:03] and I'm not going to give any parameters [01:25:07] I'm going to get the enter [01:25:08] Now, AWS Access Key ID. [01:25:12] It is already configured. [01:25:16] It is not showing. [01:25:17] It is showing only the last four characters of the key ID. [01:25:20] If I want to modify, I can modify this. [01:25:23] I'm just giving enter because nothing gets. [01:25:26] Now, secret access key also is configured as part of this client. [01:25:31] It is available. [01:25:33] It is not showing. [01:25:35] The default region, I have set it to ap-south-one, you can set it to vs-instral, you can set it to ap-east-to, whatever region, I have set it to ap-south-one which is Mumbai. [01:25:50] So if you are not going to give any region related information as part of your AWS command in your script, then by default it will take the Mumbai region to deploy your resources. For that purpose, this parameter is used. [01:26:09] and the last one is what is the default output format [01:26:13] whether you want to use JSON or whether you want to use AML [01:26:16] whichever format you wanted to use you can set it [01:26:21] so this is the setting of my AWS client [01:26:25] if you are setting the AWS client of yours [01:26:28] then you will set the account [01:26:31] access key ID, secret ID [01:26:35] default region etc. [01:26:39] So then now it is set. [01:26:42] And now if I'm going to use the AWS command, [01:26:45] it is going to use this authentication information [01:26:49] to log into my AWS account. [01:26:53] So for example, if I would just leave my laptop like this [01:26:56] without locking, [01:26:59] and the screen is available, [01:27:01] and this prompt is also available, [01:27:03] and you just drop by my desk, [01:27:06] and you execute a command, AWS command, [01:27:09] When you say create thousand virtual machines, [01:27:14] it will create thousand virtual machines [01:27:16] because authentication is available in the client. [01:27:20] So that is the reason from the security perspective, [01:27:22] if you have configured your AWS client in your laptop, [01:27:26] like any other security practices, [01:27:28] you are supposed to lock and go. [01:27:31] Otherwise, somebody can come use the AWS command [01:27:33] and create thousand virtual machines. [01:27:35] then I have to pay for the 1000 and I will not know about it. [01:27:40] And when I come to know, I can only stop or delete. [01:27:44] But for whatever period it is running, I have to pay. [01:27:47] I can't tell Amazon that, you know. [01:27:50] I was not knowing that someone else has created. [01:27:54] So that is something that you need to take care of [01:27:57] if the AWS is configured in your desktop or laptop. [01:28:03] I can also disable this temporarily, but normally people won't do, they'll just secure their laptop and then leave it. [01:28:14] Because configuring and reconfiguring again and again, it's going to be okay. [01:28:21] Yes, please, go ahead. [01:28:23] Hope I answered your query. [01:28:25] No, no, I got it clear, sir. [01:28:27] Only one thing, in this then, what is the significance of root? [01:28:31] I understood it uses your access key [01:28:34] it uses your secret [01:28:35] but what does the root means here [01:28:38] then what is it like a [01:28:40] there is no route here no there is a region [01:28:42] no root root sir [01:28:44] in the ARN command [01:28:45] you passed one more parameter [01:28:47] root is the user name right [01:28:49] root [01:28:52] I am using the root user [01:28:54] but you logged in [01:28:56] as your user correct so your [01:28:58] account or it's a different [01:29:00] That is my laptop. [01:29:02] That is okay. [01:29:03] I have my account ID. [01:29:06] Account will have a default user. [01:29:10] And that default user is the root which is created by the AWS. [01:29:15] If it is Azure, you will have a default user called Azure user. [01:29:22] Okay. [01:29:23] Clear. [01:29:24] So you have a root account also in your account. [01:29:28] I'm using root because I don't want to face any IAM permission issue in the demonstration, [01:29:33] but generally nobody will use it. [01:29:36] You got it, I got it. [01:29:38] My second question is on the config.env, [01:29:41] because we will have multiple environments, correct? [01:29:43] Dev test acceptance. [01:29:45] So for each environment, I will create a separate config.env file. [01:29:51] Okay, if you're having multiple environments, [01:29:54] you can create multiple environment files [01:29:57] for each environment [01:29:59] or in the same environment file [01:30:01] you can differentiate [01:30:03] with like how you are configuring [01:30:05] MySQL, Daemon, like that [01:30:08] you can also use the square bracket [01:30:11] development [01:30:12] have all the development configuration [01:30:15] then in square bracket [01:30:17] testing [01:30:17] all the testing configurations [01:30:19] and when you are using it [01:30:21] the script you can refer to that [01:30:23] That way also you can do. [01:30:25] Either way, you can do whichever you are comfortable with. [01:30:29] Okay. [01:30:31] And the last question in here... [01:30:33] Before executing the command, [01:30:38] you are supposed to source your environment file. [01:30:42] When you source the environment file, [01:30:45] then whatever is there in that environment only will be available. [01:30:48] For example, let me echo this dollar aws-region, ap-south-one. [01:31:01] But suppose if I change the configuration file, if I make us-east-one as my region, [01:31:09] and if I source that environment file, this variable will have the value of us-east-one. [01:31:15] so environment file is important [01:31:19] for the environment variables [01:31:20] yeah go ahead please [01:31:22] clear sir thanks [01:31:25] that is also clear [01:31:26] and my third question is on [01:31:28] when you were running that [01:31:30] deployer.sh file [01:31:31] I saw that it was trying to create [01:31:34] and pull some images [01:31:35] based on the docker.yml [01:31:37] that you have created [01:31:37] generally you need [01:31:40] some type of a container registry [01:31:42] correct where you put this [01:31:43] images or [01:31:44] or how it worked [01:31:47] in your laptop. Did your laptop [01:31:49] work as a repository? [01:31:51] No. Repository is basically [01:31:53] the AWS. [01:31:55] Okay. [01:31:56] So, let me [01:31:58] show you that. [01:32:00] Just give me a minute. [01:32:04] Basically, [01:32:05] the ECR. It is used [01:32:06] the ECR. [01:32:08] If I go to the services, [01:32:11] it is search for the [01:32:12] ECR. [01:32:13] I have used this container registry and if you look at it, I have two images in the container [01:32:28] ECR itself. [01:32:29] I am using these two images to create the container in ECS. [01:32:36] So, I have created the image using the docker file in my local desktop and then I pushed that image to the private repository in ECR. [01:32:48] That is also within AWS Soundlink. [01:32:52] Correct. Thanks, sir. And this registry need to be in the same location where the... [01:32:58] I have created a... No, not location. I think you are referring to region. [01:33:03] Region. Region. [01:33:03] It can be anywhere. It can be anywhere. [01:33:06] You can, if you have access to, then you can find the image. [01:33:12] So there is no foundation of keeping the registry in the same location where EKS service, container service runs, correct? [01:33:21] Or there is a foundation? [01:33:23] No, it is not mandatory that you need to keep the images in the same region. [01:33:29] But generally, the best practice is we will keep all these images in multiple regions. [01:33:36] As, you know, for availability, high availability and disaster recovery, we will not keep it [01:33:43] in one region. [01:33:44] We will keep it, for example, one in Mumbai and another copy in US East, so that if Mumbai [01:33:51] is not available for some region, at least the image will get served from US East. [01:33:58] So best practices, we always keep it in multiple regions. [01:34:03] One more question sir that came just now in my mind. [01:34:09] In the Nginx that you use here is an Nginx which is also working as a load balancer and an application server. [01:34:17] No, Nginx is not acting as a load balancer. [01:34:24] Actually I have used the load balancer from the AWS itself, application load balancer. [01:34:32] Okay, thank you, sir. Thank you. [01:34:38] Okay, fair enough. Okay, so just give me another five minutes. I will take all of your questions. [01:34:47] You do see three of you have raised your hand. Please do not lower your hand. [01:34:52] Let me just complete this and then we will come back to it. Hope my screen is visible. [01:34:59] do you know if you confirm the elastic container one okay so now i'm going to go back to my home [01:35:08] page now i'll go to the cloud watch cloud watch is where i have configured to capture the logs [01:35:17] now in this cloud watch we do have logs under logs we have log management log anomalies and [01:35:25] and log analytics. [01:35:27] Earlier, we used to have something called log insights, [01:35:31] wherein we will be able to see the log, [01:35:33] but now this is a new service [01:35:36] which has combined the log insights, [01:35:39] like trial and contributor insights, [01:35:41] all the three in one. [01:35:43] We can write a query. [01:35:45] If you don't know what query to write, [01:35:47] you can ask the AI to write your query. [01:35:51] You can take the assistance of the AI. [01:35:53] But what I'm going to do is, [01:35:55] I'm just going to search the log in the back-end. [01:36:02] That has happened in the last 30 minutes. [01:36:07] And what is the query I want to run? [01:36:09] This is the default query, which it shows. [01:36:12] I'm just going to give the actual request [01:36:16] that has been created in the link. [01:36:19] So the request ID is available here. [01:36:23] So I'm just going to copy this. [01:36:26] and I'm going to search for this in the CloudWatch. [01:36:30] So let me replace this with this. [01:36:35] So I'm searching in the backend, [01:36:39] selected scope, all log groups. [01:36:42] Okay, let me select backend. [01:36:45] Selected scope is 1. [01:36:47] And then last 30 minutes, [01:36:50] this is the query I just wanted to, [01:36:54] and I'm running. [01:36:56] Let us say yes, around 3.24 p.m. there were 5 matches and let me run it again, let me give a star and then search again, so now you can see something at 3.24, you can see it at 3.40. [01:37:33] let me make it last 5 minutes. In the last 5 minutes, we should not be seeing anything. [01:37:39] So basically, in the last 30 minutes, we have two records because we created two records. [01:37:46] One is at 324 and another one is at 340. Now, what is that exactly happened is the sequence [01:37:53] which is available here. So basically, it has received the request method is post [01:37:59] And the URL it has used is API orders, which is nothing but this. [01:38:05] Now from here, the order is created with an order ID, which is front-end application. [01:38:14] And then it is validated for the customer AWS and product AWS and case training quantity one. [01:38:20] So this is basically from the backend. [01:38:23] and once that is completed, it has gone [01:38:28] into the database and the request [01:38:32] is completed with status 201. 201 is nothing but [01:38:36] success status and the total duration it has taken from the [01:38:40] time we posted the request until it got updated [01:38:44] into the database is 25 milliseconds [01:38:46] and database write success. Order ID is the same [01:38:52] order id. Duration is 2531. Now, this, it has responded back. Now at 324, there was another [01:39:07] request. At 340, there was another request. Now, this is the last request that we have [01:39:14] released. Now, we are able to see the logs for all the three requests that is available [01:39:20] in the database. Where did we see this? All the 3D records. We can go ahead and look at the database. [01:39:29] DynamoDB is what we are using. Let us look at the table. We can directly look at explore items as [01:39:37] well, but let us go step faster. This is the one which is active. I am going to say yes. [01:39:42] Explore tables, you can see there are 4, quantity 20 is the one which we, but this is the old one [01:39:58] which is not available in the logs, but we can get this also. How can we get? I can go ahead [01:40:07] and I can go back to my cloud watch and if I ask for the whole day then it will give. [01:40:15] So now let me say log analytics and let me say last 12 hours and I'm not going to give any query. [01:40:31] Look in the back end, I'm just looking back end because back end to database will be able to trace. [01:40:38] Now you can see everything, anything and everything. [01:40:45] You can see the request each and every step. [01:40:51] First is your Python, URL library, health checker. [01:40:57] Health checker happens every five seconds. [01:41:01] Because if the URL is not running, it is going to restart the container. [01:41:06] So, like this if you get, you will be able to see somewhere down the line, there is a [01:41:13] request which is around 340 we have given, that is AWS order tracking demo. [01:41:19] This is the URL which has taken the post request, which has come from 172.31.1.13. [01:41:28] So, here if you look at the health button, everything is also from there. [01:41:35] Now, order ID between 340, otherwise also there are something which is going and that's why we actually write a query, which is going to fit only what we want. [01:41:52] So, let us do that again. [01:41:56] Okay, let me not do this. [01:41:59] Let me remove this. [01:42:01] Let me flick on this. [01:42:04] let me paste this and remove the request [01:42:09] and let me put [01:42:12] this star [01:42:15] okay, now let me know [01:42:21] now this will filter, you can see [01:42:24] 1, 2, 3, I'm not sure why [01:42:26] maybe it is even older than 12 hours [01:42:30] so if I don't select 12 hours [01:42:34] last, let me go last [01:42:38] 6 days, let me run [01:42:41] still, it is moving, okay, here [01:42:46] 10 matches, this, okay, I can [01:42:51] do still 12 hours only, so that you don't have a [01:42:55] confusion, this is one transaction with 340 [01:42:58] here at, there are 2 transactions [01:43:02] between 320 and 325. That's why you are able to see [01:43:07] 10 matches. And this is the one which happened around [01:43:10] 2-3 hours before, which is 5 matches [01:43:14] that means 1 request of data. [01:43:19] So 1 plus 2 is 3, plus 1 [01:43:23] is 4. And that is what exactly we were seeing in the [01:43:27] database. So if I go ahead [01:43:31] and if I explore the items, [01:43:34] explore the items, [01:43:46] four items. [01:43:49] So RCUs consumed as two for that IOTP. [01:43:52] Okay, cool. [01:43:54] So four items, four log tracing. [01:43:57] Now we have understood when we are deploying the application, [01:44:04] how the request is accepted, how it is going through. [01:44:08] If you are looking at your CloudWatch, [01:44:10] patiently with all the entries. [01:44:14] It will give you from the time the post [01:44:16] that means confirmation is clicked by the user [01:44:19] until the response back to the user, [01:44:22] you will be able to read all the logs in the virtual version. [01:44:28] I have selected only backend. [01:44:29] If you select backend, frontend, and database, [01:44:33] then you should be able to see right from URL to database. [01:44:40] So this is what I just wanted to demonstrate today [01:44:45] so that we will continue from here on [01:44:48] to see how the resources are being utilized. [01:44:51] That's our objective for tomorrow. [01:44:54] Now, let me take up the question [01:44:57] that I have enabled you. [01:45:02] Sir, what do you mean, sir, [01:45:04] thanks for the available [01:45:06] let's say some of it. [01:45:08] My question is related to containerization. [01:45:11] suppose currently [01:45:13] we have see the [01:45:15] contentization in AWS [01:45:16] and now I want to move from [01:45:19] AWS to Azure [01:45:20] so we can use the same [01:45:23] I mean file or [01:45:25] the script in Azure [01:45:27] also and it will run successfully [01:45:29] if I am not wrong sir [01:45:31] 101% [01:45:33] instead of AWS client [01:45:36] hope my screen is visible [01:45:38] is my screen visible? [01:45:40] yes no [01:45:40] So I'm using AWS Client here. [01:45:47] Instead of that, if I have Azure Client, [01:45:50] I don't have, if you install the Azure Client, [01:45:53] and then configure your Azure Client with your Azure account [01:45:59] and change your AWS commands from the deployment shell script [01:46:05] to Azure commands, it will work. [01:46:08] but you need to make this [01:46:10] changes and put [01:46:13] your effort to do that [01:46:14] it will still work [01:46:15] Azure will give you a load balancer [01:46:18] you will get the URL you can access it [01:46:20] and everything will work [01:46:22] instead of DynamoDB [01:46:23] there you will be using your [01:46:26] any other [01:46:27] LAM database [01:46:29] ok thanks sir [01:46:31] can we see the [01:46:34] all the resources file deployed [01:46:36] at that container folder [01:46:37] Where it is, can you repeat one second if time permits it? [01:46:41] So, what do you want to see, basically? [01:46:46] The container, container file. [01:46:50] You want to see the container, where it is running. [01:46:53] Okay. [01:46:54] That would be running in the ECS, because I'm using ECS. [01:46:58] I'm not using EKS. [01:47:00] So, it's an ECS cluster. [01:47:02] Now, if I go here, I have this cluster. [01:47:05] and this cluster [01:47:08] is having two containers here. You can see [01:47:12] backend service and frontend service. There are two [01:47:16] services that are running. If you go ahead and see the tasks, you will [01:47:20] be able to see all the tasks. Now there are two tasks are [01:47:24] running. Earlier two tasks are stopped. [01:47:28] It is healthy, but it is stopped. Status is not known, but [01:47:32] it stopped but these two are running which is the infrastructure if you click you will be able to [01:47:40] know the container instances but now there are no container instances running the moment the [01:47:47] request comes in because now two requests three requests we get so the container would have been [01:47:54] stopped the moment the request comes easiest will start the container so pay as you go pay as you [01:48:01] use is getting implemented here. If the request is going to continuously come on you will see [01:48:07] the container instances running here. You want to see any metrics about the container service [01:48:15] you can see here. As I know there is no data available once. Are there any scheduled tasks? [01:48:22] I don't have any scheduled tasks. If I put any scheduled tasks then that also will create [01:48:29] container event history will give you all the events that has happened so last status is [01:48:38] stopped since 24 hours so i have stopped it the other two the other two is running [01:48:47] but it will create the container only if there is a traffic hope i answered your query yes sir and [01:48:56] And that's the following question, the same can also work for the window server or we will do something else like we will, web server is a window web server, so it is workable. [01:49:12] No, the moment you say I am going to use a windows web server, that means you are not using a driver, am I right? [01:49:19] Okay, so [01:49:22] suppose any other [01:49:25] development [01:49:27] Yeah, you can. Instead of [01:49:29] NGINX, suppose if your [01:49:31] front-end service is a JavaScript [01:49:33] or if it [01:49:35] is just an HTML, CSS, [01:49:37] JavaScript combination [01:49:38] or if it is an [01:49:41] ESP file [01:49:42] or if it is an Internet Information [01:49:45] Server, which is the web services [01:49:47] from Windows. If there [01:49:49] your container, whatever it contains, the container is going to run it. [01:49:53] So it makes no difference for the [01:49:55] user, no? [01:49:58] Or even for the request. [01:50:01] Because it is containerized. If it is [01:50:04] not containerized, then you will have [01:50:06] an EC2 instance running Windows operating system [01:50:10] and you will be running Internet information server there. [01:50:13] And that will be part of your load balancer. [01:50:15] So finally, the containerization helps us to run the same [01:50:23] executive file in AWS, Azure, Windows, Linux, whatever the OS, it will support to run or execute. [01:50:34] Okay, fine. I'm not sure what is that hiding the bar. Okay, I'm not sure. Is this what I'm trying to? [01:50:43] to monitor. Okay, fine. [01:50:46] Yes, that's right with that. You are right. So, I am [01:50:48] disabling you. I am taking the question from [01:50:50] Prashant. I am allowing [01:50:52] your mic. Prashant, [01:51:00] Prashant, if you are there, [01:51:07] hopefully he is not around. [01:51:10] Satya, [01:51:12] I am allowing your mic. [01:51:16] Hi, sir. Good evening. [01:51:17] Thank you for the session. [01:51:19] So, I have two queries. [01:51:21] Please pardon me for what [01:51:23] I am asking this for. [01:51:24] in the [01:51:26] ECS [01:51:26] like you [01:51:27] have mentioned [01:51:28] it's [01:51:29] not like [01:51:30] kubernetes [01:51:31] kind of [01:51:32] oriented [01:51:32] right [01:51:32] like with [01:51:33] the portal [01:51:34] or am I [01:51:36] wrong [01:51:36] the kubernetes [01:51:37] service [01:51:38] kubernetes [01:51:38] service is [01:51:39] EKS [01:51:39] in Amazon [01:51:40] okay [01:51:42] so the same [01:51:44] thing you can [01:51:44] also deploy [01:51:45] in EKS [01:51:46] okay [01:51:49] okay sir [01:51:51] got it [01:51:52] I have one [01:51:53] more query [01:51:54] if you don't mind can I ask you [01:51:56] yeah go ahead please [01:51:57] in the deploy.assets [01:52:00] file you have mentioned [01:52:01] so there like [01:52:03] I have understood that we have taking the necessary [01:52:06] configs from the config file [01:52:07] like AWS config will configure [01:52:10] the ID secrets and all [01:52:12] but there we are also [01:52:13] taking the VPC ID and [01:52:16] subnets [01:52:16] so like are we just [01:52:20] like reading them [01:52:22] for echoing purpose or [01:52:24] are we utilizing the VPC ADN? [01:52:26] We are utilizing that [01:52:28] VPC. We are utilizing [01:52:30] that VPC. In that [01:52:32] VPC only our application is getting [01:52:34] installed. And we have chosen [01:52:36] to [01:52:36] serve networks [01:52:40] to deploy our [01:52:42] front end and back end. [01:52:45] Not just for [01:52:46] purpose. We are installing [01:52:47] our application in that VPC. [01:52:51] Okay, [01:52:51] When I checked that SSH file, I got little confused where we were using it. [01:52:58] No, no, I am echoing because you will get to know what it is that it has chosen. [01:53:05] Okay, okay. Thank you. [01:53:06] Thank you so much. [01:53:08] Okay, cool. [01:53:10] It's fine. [01:53:11] So, Saurav, I think I am enabling your mic. [01:53:18] Yes, Saurav. [01:53:20] Yeah. [01:53:20] Good evening, sir. [01:53:21] basically sir i just have a small doubt i i just want to know the difference between [01:53:26] ecs and eks basically that is one question okay see kubernetes is something which has been built [01:53:36] in the google yard i mean it was given to open source foundation only after 2016 but amazon [01:53:48] started the services in 2005, and [01:53:52] containerization also became popular around that period. [01:53:57] And around 2010-2011, [01:54:01] Kubernetes was, the source code was not available [01:54:04] because it was not given to the software foundation. [01:54:09] So what Amazon did is, to [01:54:12] compete with Kubernetes, it started a containerization [01:54:16] service, which it called as [01:54:18] ECS. So, ECS [01:54:21] is [01:54:21] AWS [01:54:23] old container solution. [01:54:26] You can use any container management [01:54:28] code to run your container. [01:54:30] It's the ECS. [01:54:32] Now, when [01:54:34] Kubernetes was [01:54:36] donated to the Software Foundation, [01:54:39] then the code was [01:54:40] available for everybody. [01:54:43] So, Amazon also [01:54:44] picked up the code. [01:54:46] Azure also picked up the code. [01:54:48] Any other code was with Google. [01:54:50] So Google started running that Kubernetes service as a GKE, [01:54:55] Google Kubernetes Engine. [01:54:57] Now, the same Kubernetes, [01:55:00] Amazon also took up the source code, [01:55:03] and it is running as an Elastic Kubernetes Services, EKS. [01:55:09] Azure also is running. [01:55:10] So once EKS started coming into the Amazon environment, [01:55:15] Then everybody started moving towards EKS and very less using the ECS, but both of them are available. [01:55:25] So, sir, basically this Docker file could be run on EKS as well, right? [01:55:31] Yes, yes. [01:55:32] Instead of using the ECS, if I use EKS service, it will go and run in the Kubernetes cluster. [01:55:40] Okay. [01:55:42] Thank you, sir. That was... [01:55:43] I chose ECS because I just wanted you guys to know something more [01:55:48] because EKS and EKS and all will come along with your cloud sessions. [01:55:55] ECS, nobody touches. [01:55:58] Thank you, sir. [01:55:58] That was just a small doubt I have. [01:56:02] Sure. [01:56:02] No problem. [01:56:03] Thank you. [01:56:04] Yes, Nishant. [01:56:05] I'm allowing you to make it. [01:56:07] This is the last question I'm going to take today. [01:56:10] Yes, sir. [01:56:10] Hello. [01:56:10] So, sir, I just have like two questions. [01:56:14] So first one is related to this EKS only. [01:56:18] So if we deploy the services in EKS, [01:56:21] then will we be seeing the same pods, [01:56:25] same containers running in ECS UI [01:56:27] or it will be only just running inside [01:56:29] that namespace of Kubernetes? [01:56:33] Sorry, come back again. [01:56:34] I missed the context. [01:56:36] Can you repeat? [01:56:37] Yes. [01:56:38] So I was saying that if we deploy the same service [01:56:41] in EKS [01:56:43] so will we be seeing [01:56:45] that containers running [01:56:47] inside that ECS [01:56:50] UI also or it will be [01:56:51] just inside running inside that [01:56:53] EKS namespace [01:56:54] only in the EKS namespace [01:56:57] you will not see EKS and ECS [01:57:00] are two different services [01:57:01] what you run in ECS you will be able to [01:57:03] see in ECS what you are running [01:57:06] in EKS you will be able to see it in [01:57:07] EKS [01:57:08] okay and so my second question is like how does uh authorization will like suppose if i want to [01:57:16] uh like make sure that whatever the request is coming from front end is like a genuine request [01:57:23] from my front end only like since we have deployed here two microservices right if i'm not wrong so [01:57:30] yeah if i want to make sure that this request is coming from a genuine microservice like from my [01:57:37] your microservice then how will i authenticate that okay if i understand your question adjustment [01:57:45] if my backend is accepting the request from frontend yes how do i know that my frontend [01:57:51] only is requesting yes sir yes yes okay so this is something that you are going to build [01:58:00] in your environment and application together so your application will be running only in your [01:58:07] environment, for example, the front-end, you actually have not exposed to the front-end [01:58:13] application. I have exposed only my load balancer. So, all my request is going to come to my load [01:58:21] balancer. Now, before it reaches my load balancer, it will be checked by my network environment, [01:58:29] which is not visible to the entire world. So, it might be going through an IDS, it might be going [01:58:34] through a firewall and then it will reach the load balancer and after that it will come [01:58:40] into my cluster. [01:58:42] So there is no question of a foreign thing coming between a front end and back end. [01:58:51] Both my front end and back end are running in my cluster. [01:58:55] What is outside of my cluster is the load balancer. [01:58:59] So now only that load balancer would be allowed to communicate to the cluster. [01:59:04] no other load balancers can [01:59:06] move traffic to this cluster [01:59:08] so once it receives from that load balancer [01:59:11] it is authenticated [01:59:12] so any which way [01:59:15] front end is also not exposed [01:59:17] you cannot reach to my front end application [01:59:19] outside the internet [01:59:21] it's not available [01:59:22] only my load balancer is available [01:59:24] makes sense? [01:59:27] yes sir, ok [01:59:28] thank you [01:59:30] cool [01:59:31] so I see Varun also [01:59:33] rising. Last question [01:59:36] I would take. It's already 9.41. [01:59:39] Yes, Varun. Please go ahead. [01:59:41] Sorry, sir. One last [01:59:42] one more question. When you're showing the [01:59:44] cloud watch, I saw [01:59:46] that your back-end [01:59:48] health check was checked on [01:59:50] 1.57.0.0.1 [01:59:53] and all [01:59:54] other things were in different IPs. [01:59:57] Question is [01:59:58] if you're running in a container, [02:00:00] it's not necessarily correct because [02:00:02] so that both the ports or the containers [02:00:05] will always go to the same virtual machine [02:00:07] or I've misunderstood something. [02:00:13] Can you repeat your question, please? [02:00:15] So when you were showing in the cloud watch, [02:00:17] when we were looking into it, [02:00:19] I saw the backend health check was on 127.0.0.1. [02:00:24] That is localhost. [02:00:26] Yeah. [02:00:27] That's localhost. [02:00:29] My question is, [02:00:30] it's not necessary that both the [02:00:32] ports or both the containers [02:00:34] will always, backend and [02:00:36] frontend will always go to the same VM, correct? [02:00:39] So in that case [02:00:40] See [02:00:42] every VM will have a local host [02:00:45] Correct [02:00:46] And a VM can have multiple [02:00:48] containers running in it [02:00:50] We have not specified [02:00:53] how many VMs to be created [02:00:56] and which container to run [02:00:58] We have just left it to the [02:00:59] ECS to run it [02:01:01] so that is where exactly [02:01:03] if you want to differentiate you can see the [02:01:05] private IP address [02:01:07] it also had [02:01:08] 172 series [02:01:10] that 127 series is only [02:01:13] for health [02:01:14] it is doing [02:01:17] locally [02:01:18] so that's why it is telling 127 local [02:01:21] host but our [02:01:22] request and all is coming from outside [02:01:25] so you would have seen the private IP [02:01:27] address 172 series [02:01:29] for our logs, transactional [02:01:32] logs. [02:01:34] Correct. [02:01:35] That's how it is differentiated. [02:01:38] Okay. So you are saying [02:01:40] that the front end and the back end will be [02:01:42] always in the same VM [02:01:43] and they are reachable on the... [02:01:46] No, need not be. [02:01:47] Need not be. But generally [02:01:49] we won't... See, what I ran is in [02:01:52] the express mode. [02:01:53] I have not configured the cluster, but [02:01:55] generally the cluster will be configured. [02:01:57] nodes will be created and containers [02:02:00] will be running in specific nodes only. [02:02:03] So that is how [02:02:04] the production setup will be. [02:02:07] In that case [02:02:08] also, you will be able to see [02:02:10] only the private IP addresses. [02:02:13] Yes, clearly, clearly, got it. [02:02:15] Well, guys, [02:02:18] I hope you would have [02:02:20] enjoyed and it could have benefited you. [02:02:24] Thank you very much. [02:02:25] One more thing Gyan is asking [02:02:27] what is the difference [02:02:28] between MySQL, MSSQL [02:02:32] and DynamoDB. Okay, DynamoDB is [02:02:36] not a RDS. MySQL and [02:02:40] SQL Server are relational databases. DynamoDB [02:02:44] is a NoSQL database. That is the only it is. Okay. [02:02:52] Hope it would have clarified you again. [02:02:56] Thank you very much, guys. We will see tomorrow afternoon at [02:02:59] 2 o'clock. We will continue our journey from here. Thank you very much. Take care. Bye-bye.