1 00:00:00,260 --> 00:00:03,030 ‫So, why did I talk about all the VPC stuff? 2 00:00:03,030 --> 00:00:05,620 ‫Well, it's to get to your typical 3 00:00:05,620 --> 00:00:07,640 ‫three tier solution architecture, 4 00:00:07,640 --> 00:00:09,680 ‫'cause now it should make a lot more sense. 5 00:00:09,680 --> 00:00:13,330 ‫So, our users want to access our web application, 6 00:00:13,330 --> 00:00:15,880 ‫and therefore, we have to designed it 7 00:00:15,880 --> 00:00:18,030 ‫to use an elastic load balancer, 8 00:00:18,030 --> 00:00:20,200 ‫that's going to be spread across 9 00:00:20,200 --> 00:00:21,710 ‫multiple availability zone. 10 00:00:21,710 --> 00:00:24,050 ‫And because that elastic load balancer 11 00:00:24,050 --> 00:00:26,600 ‫is going to be publicly accessible, 12 00:00:26,600 --> 00:00:29,820 ‫then it needs to be deployed in a public subnets. 13 00:00:29,820 --> 00:00:32,890 ‫So this is the reason why we have done this so far. 14 00:00:32,890 --> 00:00:35,450 ‫To access your elastic load balancer, 15 00:00:35,450 --> 00:00:37,560 ‫you need to do a DNS query to know where it is, 16 00:00:37,560 --> 00:00:39,860 ‫so we will use Route 53, 17 00:00:39,860 --> 00:00:42,490 ‫and then our user will be directly talking 18 00:00:42,490 --> 00:00:45,010 ‫to our elastic load balancer. 19 00:00:45,010 --> 00:00:47,420 ‫Now, our elastic load balancer is going to spread 20 00:00:47,420 --> 00:00:50,090 ‫that traffic onto our EC2 instances, 21 00:00:50,090 --> 00:00:52,830 ‫so they're going to sit in an auto scaling group, 22 00:00:52,830 --> 00:00:54,790 ‫but this time, this auto scaling group, 23 00:00:54,790 --> 00:00:57,570 ‫because it does not need to be publicly accessible 24 00:00:57,570 --> 00:00:59,710 ‫from the internet, only from the ELB, 25 00:00:59,710 --> 00:01:02,920 ‫then we are going to deploy it in a private subnets. 26 00:01:02,920 --> 00:01:04,750 ‫So we're going to have three AZ, 27 00:01:04,750 --> 00:01:07,923 ‫one, two, and three, with EC2 instances in each AZ, 28 00:01:08,930 --> 00:01:13,110 ‫and the ELB is going to be able to send the traffic 29 00:01:13,110 --> 00:01:16,000 ‫from the public subnet to the private subnet 30 00:01:16,000 --> 00:01:17,220 ‫using route tables. 31 00:01:17,220 --> 00:01:21,510 ‫So, as we can see, we have isolated the compute side 32 00:01:21,510 --> 00:01:24,100 ‫of our architecture in a private subnets, 33 00:01:24,100 --> 00:01:26,400 ‫so it is a lot more secure. 34 00:01:26,400 --> 00:01:29,840 ‫Then, we need to have the dataset somewhere. 35 00:01:29,840 --> 00:01:32,250 ‫So we're going to have a second private subnet, 36 00:01:32,250 --> 00:01:36,140 ‫one a level deeper, also called sometimes a data subnets. 37 00:01:36,140 --> 00:01:38,280 ‫And so, in this data subnets, 38 00:01:38,280 --> 00:01:40,030 ‫and this is our third tier 39 00:01:40,030 --> 00:01:43,300 ‫of our typical three tier solution architecture. 40 00:01:43,300 --> 00:01:45,520 ‫Then we're going to have Amazon RDS 41 00:01:45,520 --> 00:01:47,750 ‫which is our database, which is going to helpful 42 00:01:47,750 --> 00:01:49,910 ‫to read and write data. 43 00:01:49,910 --> 00:01:53,550 ‫So our EC2 instances are going to connect to RDS, 44 00:01:53,550 --> 00:01:56,410 ‫but another thing we can have in our data subnets, 45 00:01:56,410 --> 00:01:58,400 ‫is also going to be ElastiCache, 46 00:01:58,400 --> 00:02:01,650 ‫which is going to be helpful to cache data from RDS, 47 00:02:01,650 --> 00:02:05,720 ‫or also, for example, to store and retrieve in memory, 48 00:02:05,720 --> 00:02:08,970 ‫your session data of your EC2 instances 49 00:02:08,970 --> 00:02:10,260 ‫for your web application. 50 00:02:10,260 --> 00:02:14,830 ‫And so this is your typical three tier solution architecture 51 00:02:14,830 --> 00:02:18,380 ‫that comes up very, very often in scenario questions 52 00:02:18,380 --> 00:02:19,330 ‫at the exam. 53 00:02:19,330 --> 00:02:21,960 ‫So this is why I was talking about VPC high level, 54 00:02:21,960 --> 00:02:23,610 ‫because I wanted you to understand the idea 55 00:02:23,610 --> 00:02:25,580 ‫of subnets before getting into the typical 56 00:02:25,580 --> 00:02:27,880 ‫three tier solution architecture. 57 00:02:27,880 --> 00:02:31,180 ‫Okay, so, another thing you may see come up at the exam 58 00:02:31,180 --> 00:02:33,480 ‫is called the LAMP Stack on EC2. 59 00:02:33,480 --> 00:02:35,520 ‫So, LAMP stands for Linux, 60 00:02:35,520 --> 00:02:37,970 ‫which is going to be the operating system we're using 61 00:02:37,970 --> 00:02:39,980 ‫for our EC2 instances. 62 00:02:39,980 --> 00:02:42,030 ‫Apache, which is the web server 63 00:02:42,030 --> 00:02:45,520 ‫that will be run on Linux on EC2. 64 00:02:45,520 --> 00:02:48,270 ‫We have MySQL, which is the database, 65 00:02:48,270 --> 00:02:51,590 ‫so we can use MySQL on RDS, for example. 66 00:02:51,590 --> 00:02:54,590 ‫And finally, PHP, which is the application logic, 67 00:02:54,590 --> 00:02:56,550 ‫this is the thing that is going to understand 68 00:02:56,550 --> 00:02:58,110 ‫how to render web pages, 69 00:02:58,110 --> 00:03:00,000 ‫and that's going to be running on EC2. 70 00:03:00,000 --> 00:03:01,220 ‫So this is the LAMP stack. 71 00:03:01,220 --> 00:03:02,540 ‫And then on the LAMP stack, 72 00:03:02,540 --> 00:03:06,120 ‫you can always add Redis or Memcached from Elasticache, 73 00:03:06,120 --> 00:03:08,240 ‫to include a caching technology. 74 00:03:08,240 --> 00:03:10,870 ‫And in case we need it to store data locally, 75 00:03:10,870 --> 00:03:13,840 ‫to cache it locally, or to have our application data, 76 00:03:13,840 --> 00:03:15,250 ‫or our software, 77 00:03:15,250 --> 00:03:19,030 ‫we could use the EBS drive attached to our EC2 instances. 78 00:03:19,030 --> 00:03:23,720 ‫So that is, again, one more idea of an architecture on AWS. 79 00:03:23,720 --> 00:03:26,170 ‫Finally, if you have used Wordpress, 80 00:03:26,170 --> 00:03:27,670 ‫you may know how it works, if you haven't, 81 00:03:27,670 --> 00:03:29,400 ‫it's a blogging tool, 82 00:03:29,400 --> 00:03:32,260 ‫and so there is a way to deploy Wordpress on AWS, 83 00:03:32,260 --> 00:03:33,620 ‫so let's have a look. 84 00:03:33,620 --> 00:03:36,310 ‫We use the exact same architecture as before, 85 00:03:36,310 --> 00:03:37,940 ‫so here we have two tiers, 86 00:03:37,940 --> 00:03:39,870 ‫we have the load balancer tier 87 00:03:39,870 --> 00:03:41,660 ‫and the application tier. 88 00:03:41,660 --> 00:03:44,290 ‫And so, they need to be able to share, for example, 89 00:03:44,290 --> 00:03:46,150 ‫images that the users are sending, 90 00:03:46,150 --> 00:03:50,090 ‫so the users are sending images to our EC2 instances 91 00:03:50,090 --> 00:03:51,500 ‫through the load balancer. 92 00:03:51,500 --> 00:03:55,080 ‫And so the EC2 instances need to be able to share 93 00:03:55,080 --> 00:03:58,630 ‫these images with all the other EC2 instances, 94 00:03:58,630 --> 00:04:01,910 ‫and for this, the perfect use case is EFS, 95 00:04:01,910 --> 00:04:04,780 ‫which is a network file system, an network drive, 96 00:04:04,780 --> 00:04:07,600 ‫which will creates elastic network interfaces in each AZ, 97 00:04:07,600 --> 00:04:11,880 ‫and so your EC2 instances can store your images on EFS, 98 00:04:11,880 --> 00:04:13,920 ‫and all the other EC2 instances 99 00:04:13,920 --> 00:04:16,440 ‫will have access to these images. 100 00:04:16,440 --> 00:04:18,750 ‫So this is a very simplified diagram architecture 101 00:04:18,750 --> 00:04:20,270 ‫for Wordpress on AWS, 102 00:04:20,270 --> 00:04:22,420 ‫I haven't represented the database and so on. 103 00:04:22,420 --> 00:04:25,530 ‫And so, on the website of AWS, 104 00:04:25,530 --> 00:04:29,160 ‫there is a full blown architecture for Wordpress, 105 00:04:29,160 --> 00:04:31,450 ‫which surprisingly, by now, 106 00:04:31,450 --> 00:04:34,070 ‫you should understand almost entirely. 107 00:04:34,070 --> 00:04:36,780 ‫So, have a look at this diagram on your own time, 108 00:04:36,780 --> 00:04:38,050 ‫it's pretty cool. 109 00:04:38,050 --> 00:04:39,820 ‫You should be able to understand everything, 110 00:04:39,820 --> 00:04:42,770 ‫so we have NAT gateways, internet gateways, 111 00:04:42,770 --> 00:04:45,200 ‫we have auto scanning groups, different subnets, 112 00:04:45,200 --> 00:04:49,670 ‫we have Aurora, EFS, location technology, and so on. 113 00:04:49,670 --> 00:04:52,220 ‫The only things you shouldn't understand just yet 114 00:04:52,220 --> 00:04:54,170 ‫is CloudFront and S3, 115 00:04:54,170 --> 00:04:56,800 ‫but don't worry, that's coming up very very soon. 116 00:04:56,800 --> 00:04:58,740 ‫And so, the whole purpose here is to show you that 117 00:04:58,740 --> 00:05:00,870 ‫you have learned a lot already by now 118 00:05:00,870 --> 00:05:03,250 ‫on the solution architecture on AWS, 119 00:05:03,250 --> 00:05:06,320 ‫which is going to be very helpful as a developer 120 00:05:06,320 --> 00:05:08,010 ‫in your exam, okay? 121 00:05:08,010 --> 00:05:09,850 ‫So that's it for this lecture, 122 00:05:09,850 --> 00:05:10,800 ‫I hope you liked it. 123 00:05:10,800 --> 00:05:13,330 ‫Please take your time to look at this architecture, 124 00:05:13,330 --> 00:05:15,603 ‫and I will see you in the next lecture.