ACG Cliff Notes: A Baby Step into EC2
The first step!
After you get logged into the AWS Console for the first time, click “EC2” and you’ll see a (mostly) empty dashboard, kind of like this:
Click “Launch Instance” and view some virtual machine options:
Now, let’s configure it:
Here’s the config if you wanted to set up a Spot instance (where you’re essentially programmatically bidding based on a max, like eBay!):
If you don’t select Spot, you can specify hardware:
And, lastly, you can purchase a Reserved instance! For example, for a t2.micro here are the current 3-year contracts:
OK, back to configuration of your On Demand instance…
Pick a subnet if you want (only 1 subnet per AZ):
Want to bootstrap your instance with extra custom magic? Pass commands into User data:
Now, let’s look at Storage (every instance needs virtual volumes!):
Add tags! So we can, for example, programmatically stop this instance later.
Add security groups! SSH for doing stuff on our instance, and HTTP/HTTPS for making it open to the world.
But wait…key pairs! So we can SSH in…
Now, SSH in (if you Windows, I’m sorry you’ll have to learn PuTTy first 😿) using your Public DNS and the key you downloaded. Example:
OK, after that, do
sudo su and
yum update -y:
Now, make it a web server with Apache!
yum install httpd -y and make sure it starts on boot by default:
chkconfig httpd on
cd /var/www/html and create a
index.html file! Mine says “hello amigo” without any HTML markup. Then do
service httpd start and go to your public IP!