ACG Cliff Notes: A Baby Step into EC2

The first step!

Ford Prior
3 min readAug 27, 2018

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:

$115 for three years! That’s a pretty good deal, IMO.

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!):

“Root” is where you’re booting the Linux OS from.

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.

NOTE: Rules are stateful, meaning that adding an Inbound rule automatically adds an Outbound rule. NOTE #2: You can add multiple security groups, which layer on top of each other. NOTE #3: You can customize the default SG. NOTE #4: All inbound traffic is blocked by default with a new SG (and all outbound is allows). NOTE #5: You can’t block a specific IP via SG’s (use Network ACL’s for that). NOTE #5: SG changes take place immediately.

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

Then, do 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!

--

--