Scott's Recipes Logo

AWS Tutorial 19 - Back to the Basics, Let's Talk AMIs and EC2 basics

I just used Hyde to examine my blog and I realized that I have written almost 20,000 words on AWS since 8/23/16 (note some of that is still unfinished and in draft form). Using my standard writer metric of 250 words per page, that’s 78 printed pages. Wow. And, alas, I realize that there are still things I haven’t written about. And some of them are the sort of basic things that you either just ignore or that you accept by rote - “I know, we’ll use Ubuntu, we love Ubuntu!”. And, yes, that would be me. So let’s take a deeper dive here at some of the basic options when you build an EC2 instance.

What is an EC2 Instance?

An EC2 instance is just a server in Amazon’s cloud. And, from what I can tell, pretty much everything AWS offers comes down to a server somehow. When you build an EC2 instance you have to base it on an operating system which is called an AMI and there are a bunch of options that define what AMI you want to pick:

Here’s a picture of the initial EC2 instance selection web page:

aws_ami_ec2.png.png

There are a few basic options that you really want to keep in mind:

The Linux Distro Question

Asking anyone in the Open Source world what is the best Linux flavor or “distro” (that’s short for distribution) is a bit like asking someone their favorite color – the answer is always different and always subjective. And while there are differences, in the end, it is all Linux and if you can use one Linux then you can use a different Linux. I know there are serious Linux folk that read this line and are gnashing their teeth and I apologize.

Personally I’ve used at different times:

And I’m pretty sure there were some others; that’s just want I can remember using. The short answer is you want to pick a Linux distribution that:

The Amazon Linux Distribution

Interestingly Amazon has their own Linux distribution. I don’t have a ton of experience with it yet but I’m keenly interested in it and I really like their focus on performance.

Pros:

Cons:

How Important Is this With Automated Provisioning?

In the days where you configured Linux manually, picking the right distribution was actually quite important. Thanks to automated provisioning tools like Ansible, I’m not so sure now. I’ve already used Ansible to move from one version of Linux to another and its just not that hard. If you write your Ansible playbook properly and abstract things like the username into variables, you can modify it pretty easily to go between distros.

Summary

In the end you likely want to pick: