A Website Behind the Scenes
To spin up EC2 instances is a rewarding experience, all it is a click of a few buttons and voila! Remember the days to set up a linux distro, you needed to create a live CD to run off it, the flash memory and now, cloud! To go even further, remember when you needed hefty machines to act as servers? You were the one who connected all the wires, ran the disks and loaded the programs. That's it, thats as far as my tech knowledge goes, tech from 2009. Anyway enough ramble for the sake of content.
EC2 is AWS (Amazon Web Services) for a virtual machine with a operating system. Currently I am using Debian;
I decided to go with Ubuntu this time. The setup was straight forward and Amazon gives you a pair key to save locally. The guide also provides directions to connect over SSH with Putty.
Once you connect to your ubuntu instance, with a default password of ubuntu; I found this out the hard way, you basically then
install lamp components. L stands for linux, check we have that running, A is apache and we do so with a sudo apt install apache2. Apache being the web server,
meaning this deals with creating a folder under var/www/html that handles HTTP requests. M is for MySQl and thus a Database is created, AWS allows for up to 200Gb
of data on their free teir if I recall correctly. Finally the P is for PHP and our server side code render. I chose the LAMP stack because it is the most familiar at the
moment, my hopes is to have a playground to test out different Stacks and see which I can learn and place under my tool belt.
Here are the resources I used.
The various usernames that come with a built EC2 instance on AWS
Connecting Ec2 to Putty with SSH