Amazon Linux Red Hat

Amazon Linux vs RHEL

Amazon has taken the top spot as a cloud services platform.  The Amazon EC2 (Elastic Compute Cloud) service allows you to quickly scale up or down cloud computing resources to meet the needs of your project.  EC2 includes a number of services and tools to make the use of their platform more stable and easy to use.  One of these tools is Amazon Linux.

Amazon Linux, originally based on Red Hat, is a streamlined distro that is optimized to run on EC2 instances. It is tailored to meet the challenges of the platform as well as supplying a number of tools to integrate seamlessly with the EC2 services.  It is not a standalone Linux distro and is only available to use on an EC2 environment.

Amazon and the community make available AMI’s (Amazon Machine Images).  These are essentially pre-built machines that can be quickly spun up on EC2 to remove some of the OS install and initial system administration functions.  There are a wide variety of OS AMI’s available to install with both Windows and Linux distros.

So with so many choices, which is the best distro to use on EC2?  I will compare Amazon Linux to Red Hat Enterprise Linux (RHEL) to highlight the differences and possible reasons to choose one over the other on the EC2 platform.

Integration

Both distros are offered in the EC2 environment as an AMI.  This makes it easy to instantiate a new environment with only a few clicks. You can spin up either of these environments in only a matter of minutes. Where these OS’s differ is in the level of integration that Amazon has included with its namesake distro.  It has included standard tools that improve integration and performance with its EC2 environment.  Red Hat doesn’t offer these tools as a standard package included with the distro, but many of these tools can be installed separately from repositories.

One downside to the tight integration of Amazon Linux to EC2 is the fact that Amazon Linux environments cannot be migrated to another cloud platform.  A decision to separate from EC2 would mean that you would need to migrate to a different distro.  While this is not an insurmountable hurdle, it is something to be conscious of when choosing a distro.  This coupling also presents an issue when it comes to development environments.  Because Amazon Linux can only be run on EC2, the development and QA systems must also be on EC2. This adds cost to the project, while not completely negligible, these costs could be low if you spin down the systems at end of day and do not use much data throughput or have large persistence layers.

RHEL can be setup on any server both local and on EC2 this allows your development and QA team to work seamlessly between the cloud and local development instances.  This could represent a savings if you have local hardware that is used for this purpose.  This independence also allows you to migrate your environment to another cloud provider or server in general.  If you are not sure that you will stay a part of the Amazon EC2 family, it may be a good idea to steer clear of their platform specific OS.  Using Amazon Linux may make things a bit of a challenge if you decide to switch providers.

Performance

As one may conclude from an Amazon curated distro, performance and integration are tailored to the EC2 cloud environment.  Amazon Linux offers rolling updates that include performance enhancing tools and security features specific to the EC2.

This article shows benchmarks of Amazon Linux and RHEL running on EC2.  From this benchmark, Amazon Linux offers better performance in some areas.  These performance increases are only slight over the competition but could represent better performance for a production application.

Updates

One of the biggest points that is mentioned when discussing the topic of Amazon Linux is the rolling updates.  When choosing an environment for production it is critical to choose a stable distro and version that will not cause your application to crash and burn in production.

One out-of-the-box configuration for Amazon Linux is rolling updates.  This feature makes your system update-to-date with the newest packages and changes as they are released.  This is great for bleeding edge devs who want to start using the newest toys as soon as they are released. However, dependency changes and OS updates could have major impacts to a production application that is running when the changes are released.

RHEL, on the other hand, releases LTS versions that remain stable for years following their release.  This provides a consistent starting point for your development without needing to upgrade your application dependencies frequently.  This eliminates the concern with live updates that could wreak havoc on your application.

That said rolling updates are a configuration setting in Amazon Linux.  The configuration can be set to turn off rolling updates and eliminate some of the concern with this feature. Because Amazon does not guarantee that security updates or bug fixes in older versions, it may still become necessary to upgrade on a periodic basis.  Dependency changes and frequent updates could cause headaches for small development teams whose main focus is delivering their application to market.

Conclusion

So which is the best Linux distro for the Amazon EC2? That question depends on a number of factors ranging from need for security and performance, risk tolerance and how much you love EC2.  Amazon Linux offers tight integration that provides a development team with up-to-date security releases and bleeding edge tools to maximize performance on EC2.

With this tight integration comes some headaches.  RHEL provides a stable release environment that developers can rely on for years without having to update.  Its ability to migrate to different cloud platforms and to be used on in-house dev environments may save headaches if you migrate to a different cloud provider.

About the author

Avatar

Brad Patton

Brad Patton is a software engineering consultant and writer who delivers high quality software systems to his clients. He received his undergraduate and graduate degree in Computer Science. Brad leverages his expertise in programming and mathematics to develop profitable algorithmic trading strategies. He shares his experience by writing about his tools and strategies. He can be found on Twitter at @BradleyPatton.