AMI on EC2 vs. CentOS on Linode

What I learned in migrating from CentOS on Linode to Amazon AMI Linux on EC2.

VPS Hosting and Operating System

A change of VPS providers is generally not such a big deal, unless one is dependent on proprietary tools of the previous provider. In the case of Linode, there are some nice graphs, and they have the Linode Shell (Lish) that is handy when things go south.

But moving to Amazon is like entering a different galaxy, one that has alien technology. Sure, in the end you've got a web server, an email server, a vpn, etc., but configuration tools and where things go can be a bit of a learning curve.

CentOS vs. AMI

Amazon Linux AMI is more or less a fork of RHEL and/or CentOS, depending on whom one reads. The main points are:

  • AMI lags a bit behind CentOS, which lags a bit behind Fedora
  • AMI may or may not yet have systemd (as of June 2017 it does not, treat the system as CentOS 6.x)
  • firewalld may or may not work on AMI, some reports are it does not yet (more on this)
  • systemctl does not function out of the box, instead use service and chkconfig


Security Group

IP Addressing

Unlike most VPS hosts, public IP addresses are not doled out automatically, at least not permanent ones. For that, one needs to provision an elastic ip address. A small number are available per account per region (5), but there are charges for outbound traffic. Also, it is important not to have elastic ip addresses assigned to unactive instances, as there are additional charges, as well as if multiple elastic ip addresses are assigned to a single instance.

EB vs. EC2 vs. Lambda

There are other options to explore with AWS

Deploying WordPress to Amazon Web Services AWS EC2 and RDS via ElasticBeanstalk

Linode to AWS

I've been aware of Linode for a decade, but first started seriously kickin the tires in April, 2014. In November, it was time and I began installation, configuration, and testing, with production sites up in early December, 2014. At 2.5 years, this is the approximate time span for moving to a different platform (in terms of my Sysops habits). Actually, though, I have been content with Linode. The precipitating event to migration was a requirement for a location in Canada, and also an unacceptable amount of downtime on a different VPS host located there. Taking a closer look at AWS offerings, and especially getting a better understanding of billing, convinced me this is viable platform for my price/performance needs.

AWS Billing

It is vital to understand how Amazon bills out various services. Not paying attention can easily mean a lot higher costs, without necessarily more services. Another aspect of billing is the apparent greater efficiency of Amazon Linux AMI on EC2, which means that greater resources are not needed (and as is the case with much of the rest of the hosting universe, those numbers that are provided are not real, due to oversubscription.

Amazon Lightsail as an Alternative to EC2 T2.Nano

Amazon Lightsail is a VPS package that provides simplified control panel, and greater resources. For $5 USD/month, the smallest Lightsail instance is essentially a T2.Nano plus Elastic IP address, 20gb EBS storage, 1tb of outbound data, and Route53 DNS interface. Since outbound data can run 0.10/gb (with elastic IP), this is potentially $10/mo in database. The EBS storage is ~$2 USD, Route53 is $0.50 USD, and a nano instance with 1 year contract is ~$3.50 USD. This means for $5 USD/mo, one gets between $6-106 USD in AWS resources. For the $10 USD Lightsail, the value consists of a T2.Micro, and all the rest, which is worth $11-$211 USD in services due to an increase to 30gb EBS and 2TB data transfer out.