Move your LAMP stack on AWS
The combination of Linux, Apache, MySQL, and Python or PHP (LAMP) is one of the most common software stacks for web servers, even for high-end web applications. In this course, the experienced sysadmin David Clinton will teach you how to install and configure a LAMP stack on AWS EC2 and RDS, also discussing security issues and selecting the right instance type for your application.
This course will cover all the steps in the process: from creating an instance to building a website-hosting LAMP stack. You'll find everything you need to configure your webserver using EC2 (Elastic Cloud Compute) and RDS (Amazon Relational Database) to power your MySQL instance.
Who should take this course
This is a beginner course that aims to introduce basic AWS concepts to anyone looking for a quick guide to building a web server in the AWS cloud. We'll take you through all the basic steps, from configuring your Linux installation to using Amazon RDS to take advantage of AWS scalability.
You should have some basic Linux knowledge. If you are new to Amazon Web Services, why not watch our AWS Basics course or some of the other introductory courses to the common AWS services, like Amazon RDS
And feel free to test your knowledge on the basic topics covered in this course by taking a quiz.
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
Hi. Welcome to this video which will look at choosing an EC2 on Amazon Web Service instance type that best fits your needs.
You may have already have launched some Amazon instances. But you're probably have noticed that there is a huge range, a bewildering range of instance types you can choose from. Which one's best for you? You don't want to be under-powered. You don't want to be lacking the basic computing and storage resources that you need to provide your service. But on the other hand you don't want to be overpowered. You don't want to pay too much and paying too much in the long run can actually add up to a lot of money and can mean the difference between a successful and an unsuccessful business venture. You got to get it right. So, how do you choose? Let's start at the EC2 dash board. There's a big blue button, towards the left in the middle that allows us to launch an instance which brings us to what is probably a familiar screen, where we can choose between operating systems. We're going to choose the Ubuntu server 1404LTS as we have in the past. Now we reach the instance type screen. And here things get whole lot more complicated. There are instance types, for instance T1, M3 medium, M3 large and they have descriptions. They are part of families: general purpose, compute optimize, GPU instance, memory optimize, storage optimize, which is best for your particular needs. So of course only you can answer that. Only you know the specific needs, of your task. For instance, are you going to require a great deal of storage space? Is your database going to grow, and grow very quickly? Are your logs going to grow? I've seen log files on systems that span across terabytes. So do you need to keep your logs? How much computing power are you going to need? How many visitors are you gonna be coming to your site each hour? What are they gonna be doing? Are they gonna be performing a lot of reads and writes against your database? Again these are questions only you can answer.
Let's look however, at the various families of instance that amazon makes available. There's first micros which as you can figure out from the name is a very unexpansive, but rather under-powered option. This is good for the blog or more personal website type. Generally, there is an attempt to balance as many potential needs as possible into relatively small, relatively lightweight but relatively cheap profiles of computing power. Compute focuses on blog computing power. A large number of virtual CPUs are high CPU speeds. These can be used for high traffic websites or high performance signs in engineering applications. The memory family focuses on high memory availability which can be used for performance sensitive databases. The storage family, obviously, provides a greater volume of storage space, what we may call hard drives. Actually almost all the amazon instances right now use solid state drives which provide much, much quicker read/write response time.
And finally GPU, Graphic Processing U nit, which probably won't interest us but are very important if you are providing a video gaming experience.
For up-to-date details on each of these families in each of these instance types, you may wonna look at the Amazon webpage, aws.amazon.com/ec2/instance-types.
One of the metrics used to measure and describe the power of a particular Amazon instance, is the EC2 compute unit. An instance might be described as having five EC2 computing units or ECUs, or 10 ECUs or 20 ECUs. What is an ECU? Well it seems, unless it's been updated, but it seem at Amazon considers one ECU as its equivalent of WCU capacity of a 1.0-1.2GHz, Opteron Xeon processor from 2007. So if you have sent yourself the kind of power that it will provide, you want to Google the Xeon and Optiron processors that were available around 2007, and look up the specs and the performance statistics that are so seated to those processors. You'll get a few of one ECU, One EC2 Compute unit. Finally, and this is good news, the Amazon System and really the Cloud Computing System generally beyond Amazon allows you to change very quickly upwards or downwards. The computing profile that you've choose on. It turns out that it isn't working out for you that there is enough power or there's too much power, you can adjust it quite simply. How will you know when things aren't working out? Maybe most obvious symptom will be customer calling you or email you that the website is not responding the way it's supposed to. You really shouldn't let it get that far. You should test it yourself regularly. Log in to your own website to make sure that it is providing the performance that you expect. But there are more direct focus tools to keep track of how your instances perform.
Let's log in our instance, a terminal as SSH and through the command Top. You see there is not a lot going on in this instance. There is nothing really running.
But often, you'll see something call them rather than the percentage of the CPU. But the percentage of the CPU which is currently being used, it wouldn't be 0.0%, it might be at 99%, it can go over 100%.
It does that sometimes when the computer is a bit over stressed or memory, the percentage of the memory, the RAM in the system that is being used wouldn't be at 7.1%, 0.5%, it could be at 99% or over. If you see slowdowns on your website, you run a program like TOP on the command line. Then you see there is a particularly high stress level on your CPU or your memory or on other resources of your computer.
of the instance that you are running, then it is pretty decent indication that you may need to beef up the profile and choose a more powerful instance. If on the other hand you check and can see results like this where there's virtually no stress against the CPU or memory, then maybe you're power then maybe you could use a lower powered instance. In any case, we've scratched the surface. Barely scratched the surface. There are many details that really should go into the calculation of what sort of instance you need.
But I think we provided the overview to point you into the direction that might allow you to do your own research and get to your own specific unique answer in an intelligent and economical way. We hope to see you next time for the next video.
David taught high school for twenty years, worked as a Linux system administrator for five years, and has been writing since he could hold a crayon between his fingers. His childhood bedroom wall has since been repainted.
Having worked directly with all kinds of technology, David derives great pleasure from completing projects that draw on as many tools from his toolkit as possible.
Besides being a Linux system administrator with a strong focus on virtualization and security tools, David writes technical documentation and user guides, and creates technology training videos.
His favorite technology tool is the one that should be just about ready for release tomorrow. Or Thursday.