‫So, why did I talk about all the VPC stuff?
‫Well, it's to get to your typical
‫three tier solution architecture,
‫'cause now it should make a lot more sense.
‫So, our users want to access our web application,
‫and therefore, we have to designed it
‫to use an elastic load balancer,
‫that's going to be spread across
‫multiple availability zone.
‫And because that elastic load balancer
‫is going to be publicly accessible,
‫then it needs to be deployed in a public subnets.
‫So this is the reason why we have done this so far.
‫To access your elastic load balancer,
‫you need to do a DNS query to know where it is,
‫so we will use Route 53,
‫and then our user will be directly talking
‫to our elastic load balancer.
‫Now, our elastic load balancer is going to spread
‫that traffic onto our EC2 instances,
‫so they're going to sit in an auto scaling group,
‫but this time, this auto scaling group,
‫because it does not need to be publicly accessible
‫from the internet, only from the ELB,
‫then we are going to deploy it in a private subnets.
‫So we're going to have three AZ,
‫one, two, and three, with EC2 instances in each AZ,
‫and the ELB is going to be able to send the traffic
‫from the public subnet to the private subnet
‫using route tables.
‫So, as we can see, we have isolated the compute side
‫of our architecture in a private subnets,
‫so it is a lot more secure.
‫Then, we need to have the dataset somewhere.
‫So we're going to have a second private subnet,
‫one a level deeper, also called sometimes a data subnets.
‫And so, in this data subnets,
‫and this is our third tier
‫of our typical three tier solution architecture.
‫Then we're going to have Amazon RDS
‫which is our database, which is going to helpful
‫to read and write data.
‫So our EC2 instances are going to connect to RDS,
‫but another thing we can have in our data subnets,
‫is also going to be ElastiCache,
‫which is going to be helpful to cache data from RDS,
‫or also, for example, to store and retrieve in memory,
‫your session data of your EC2 instances
‫for your web application.
‫And so this is your typical three tier solution architecture
‫that comes up very, very often in scenario questions
‫at the exam.
‫So this is why I was talking about VPC high level,
‫because I wanted you to understand the idea
‫of subnets before getting into the typical
‫three tier solution architecture.
‫Okay, so, another thing you may see come up at the exam
‫is called the LAMP Stack on EC2.
‫So, LAMP stands for Linux,
‫which is going to be the operating system we're using
‫for our EC2 instances.
‫Apache, which is the web server
‫that will be run on Linux on EC2.
‫We have MySQL, which is the database,
‫so we can use MySQL on RDS, for example.
‫And finally, PHP, which is the application logic,
‫this is the thing that is going to understand
‫how to render web pages,
‫and that's going to be running on EC2.
‫So this is the LAMP stack.
‫And then on the LAMP stack,
‫you can always add Redis or Memcached from Elasticache,
‫to include a caching technology.
‫And in case we need it to store data locally,
‫to cache it locally, or to have our application data,
‫or our software,
‫we could use the EBS drive attached to our EC2 instances.
‫So that is, again, one more idea of an architecture on AWS.
‫Finally, if you have used Wordpress,
‫you may know how it works, if you haven't,
‫it's a blogging tool,
‫and so there is a way to deploy Wordpress on AWS,
‫so let's have a look.
‫We use the exact same architecture as before,
‫so here we have two tiers,
‫we have the load balancer tier
‫and the application tier.
‫And so, they need to be able to share, for example,
‫images that the users are sending,
‫so the users are sending images to our EC2 instances
‫through the load balancer.
‫And so the EC2 instances need to be able to share
‫these images with all the other EC2 instances,
‫and for this, the perfect use case is EFS,
‫which is a network file system, an network drive,
‫which will creates elastic network interfaces in each AZ,
‫and so your EC2 instances can store your images on EFS,
‫and all the other EC2 instances
‫will have access to these images.
‫So this is a very simplified diagram architecture
‫for Wordpress on AWS,
‫I haven't represented the database and so on.
‫And so, on the website of AWS,
‫there is a full blown architecture for Wordpress,
‫which surprisingly, by now,
‫you should understand almost entirely.
‫So, have a look at this diagram on your own time,
‫it's pretty cool.
‫You should be able to understand everything,
‫so we have NAT gateways, internet gateways,
‫we have auto scanning groups, different subnets,
‫we have Aurora, EFS, location technology, and so on.
‫The only things you shouldn't understand just yet
‫is CloudFront and S3,
‫but don't worry, that's coming up very very soon.
‫And so, the whole purpose here is to show you that
‫you have learned a lot already by now
‫on the solution architecture on AWS,
‫which is going to be very helpful as a developer
‫in your exam, okay?
‫So that's it for this lecture,
‫I hope you liked it.
‫Please take your time to look at this architecture,
‫and I will see you in the next lecture.