I'm setting up my first website on Amazon EC2, and I'm trying to decide which distro to use. I've used Redhat and CentOS in the past, but I have no bias towards any system, I just want to use whatever is best (I also have had partially-managed servers in the past, so I haven't done too much server administration until recently). The website is just a web app written in PHP and MongoDB.

I like the idea of having a lightweight OS that is described for Amazon Linux, but I worry that it could suffer in compatibility/updates compared to Ubuntu or other options that have teams focused exclusively on a server OS. Any advice?

7 Answers 7


I was in a similar situation; fully managed dedicated server, LAMP, CentOS. Then we decided to move to EC2. Also, I had very little systems or linux administration experience. I have almost zero experience with Ubuntu, so I really cannot speak to which is the so-called better OS.

I tried a bunch of pre-built AMI's with minimal OS installs from Rightscale, Alestic, Scalr and Amazon. I ended up building all my own AMI's on top of Amazon Linux, first using version 2010.11.01, now I've migrated all my custom AMI's to Amazon Linux version 2011.03.01.

The decision to go with an Amazon Linux AMI vs the other AMI providers was not an easy one. I played around with and tested different setups for close to a month before I made my final decision. In the end, since I wanted to use CentOS, it basically boiled down to one thing. I figured who better to know what hardware related dependencies needed to be included in the OS than the people who designed, built and maintain EC2. Nothing against Rightscale, Scalr or Alestic.

Six months later, even though I hit a few bumps in the road, Amazon's Linux has been quite stable. Though, I did decide to compile some of the software we use from the source (ie. php 5.3, MySQL 5.5, etc) because I ran into trouble with the pre-built packages Amazon maintained in their package repository.


Amazon Linux is a rolling distro, like Fedora, or Debian Testing (sort of). In my view it is not suitable for any production product whatsoever. I'm surprised more people do not realize this. This means if you launched your Amazon Linux instance, say, 450 days ago and do an update today, you will be pulling updates from an entirely different release. Once a new release is made, you have no buffer time, you immediately start pulling updates from the new release. As you can imagine, this may pull in a cascade of dependencies, and has a tendency to break things. For this reason it is inherently unmanageable. You cannot work something like this into an update policy without it being an absolute mess. Do not use Amazon Linux for anything serious.

Ubuntu LTS is a fine choice, as is Debian Stable or CentOS. All of those give you many years of updates to the same release.

Amazon Linux also has no bug tracking system, users must post questions in the AWS Developer Forums to file a bug against a package! There is no way to search for bugs, either. This should be a showstopping issue for almost everyone.

Amazon Linux makes it very difficult to retrieve source packages, needlessly.

  • 2
    This is only a problem if you don't have a test environment to do the update against first.
    – ceejayoz
    Feb 12, 2015 at 16:36
  • 4
    Well, you voted down the single correct response here. You are not thinking this through. First, it offers no benefit over other distros, so it is pointless and counterproductive to put yourself through the extra trouble. Why make unnecessary work for yourself? Secondly, you are demonstrably wrong here. Updating 2013.9 with packages from 2015.3 is absolutely crazy. You have almost no way to test all the things that can break here. Most people get by with this (as do we) but it is impossible to create and maintain a security policy with a rolling distro.
    – figtrap
    Feb 12, 2015 at 17:03
  • 2
    I do not know why Amazon Linux is so popular, I wager because most do not realize it is a testing distro. If you reccomended Fedora for a production product the admins would laugh you out of the room. This is precisely what you are doing with AMZN Linux. It's not a matter of "if" this decision will bite you in the future, it's a matter of when.
    – figtrap
    Feb 12, 2015 at 17:08
  • 5
    No benefit? It's put out by the vendor of the infrastructure it's running on. Any AWS-related issues are likely to be fixed in Amazon Linux first. I've been quite happy with Amazon Linux, as have many others, and we've had no trouble with it on client security reviews (including very very very picky financial institutions).
    – ceejayoz
    Feb 12, 2015 at 17:29
  • 4
    – ceejayoz
    Feb 12, 2015 at 17:36

Since this question was written, Amazon completely revamped for Amazon Linux AMI 2011.09, with all the bootstrapping for CloudFormation as well as Amazon tools.

Also, it includes Nginx and PHP-FPM in the yum repos if you're looking for fast and light.

Keep up with the latest releases here: http://aws.amazon.com/amazon-linux-ami/latest-release-notes/

Also keep an eye on security updates: http://aws.amazon.com/amazon-linux-ami/security-bulletins/

You'll usually have less to worry about, as the base AMI is a bare bones server with just the tools needed to bootstrap the services you actually need.


If you already have some familiarity with RHEL/CentOS, I'd stick with that. There is no "best" distro for a web app server. It comes down to what tools and conventions you are most familiar with.

  • Well the point is that I'm not tied to any right now and not overly familiar with any (but I'd like to get familiar). Jun 1, 2011 at 1:06
  • 1
    Then try setting up one of each and see which you like better.
    – dmourati
    Jun 1, 2011 at 1:18
  • 5
    Amazon Linux is based on CentOS (forums.aws.amazon.com/thread.jspa?messageID=245351). So you've got a five-way race between three different flavors of RHEL (CentOS, Amazon, and RHEL itself) and two different flavors of Ubuntu (11.04 and 10.04 LTS). Anyone trying to tell you there's only one good choice amongst that list is trying to sell you something. That said, for the vast majority of server uses, I'd only seriously consider CentOS, Amazon, and Ubuntu Server 10.04 LTS, in that order.
    – BMDan
    Jun 1, 2011 at 1:26

Although Ubuntu does better on these benchmarks, the tests themselves contribute towards Ubuntu winning, and the differences don’t seem to be big anyway.

I recently chose Amazon Linux largely because of automatic updates, and also because of the Ubuntu AMI bug reported by Steven and Ethan in the Quora version of this question.


If you want to get familiar quickly, and like installing things without much though I'd go ubuntu. Generally, on a live web server you don't want to be able to do this kind of thing! People would also argue the choice is between RedHat, CentOS and Debian. The hard core techies insist ubuntu is not fit for live server environments because not everything is fully secure and tested.

My choice would be ubuntu as it's alot less of a headache, I've used quite a few different distros for web servers, but changing firewall rules and things can be alot easier in ubuntu.

The only other thing is that ubuntu is a bit more top heavy in resource usage, so CentOS may save you a few dollars a month based on the amazon method of pricing!


In your case, familiarity with CentOS/RHEL probably trumps any other considerations.

The systems I work with have largely been on the edge -- new software using new technologies and new versions. For this use Ubuntu is a better choice; I avoid building packages from source code, and Ubuntu's packages are well maintained (by no means perfect, of course) and standard repositories tend to have the stuff we need, and if not, there are repositories readily available. I tend to stay back one revision from the latest as issues tend to get worked out after a few months.

Not the answer you're looking for? Browse other questions tagged .