EC2: AMIs and Operating Systems

Get an overview of the different operating systems we can run on EC2.

We'll cover the following

Overview

EC2 allows us to run multiple operating systems on our EC2 instances. The vast majority of web applications run on Linux, but for other use cases, it might be helpful to have access to Mac and Windows instances. One example would be app development. Imagine we are working for a company that builds both Android and iOS apps. We could use an EC2 Mac instance to compile the iOS version of this app.

So, how can we choose which operating system is running on our EC2 instance?

This is done through AMIs (Amazon Machine Images). Let’s take a look at how we can run different operating systems.

Linux

Running versions of the Linux operating system is very straightforward on EC2. We just need to select the right AMI and start our EC2 instance with it. If we create a new EC2 instance through the AWS Console, we can search for Linux AMIs. We can use the EC2 Launch wizard to see the available AMIs. AWS offers multiple Linux versions and distributions (Amazon Linux, Red Hat Enterprise Linux, and SUSE). To start an instance with any of these, we just select them in the wizard or copy the AMI ID if we want to run it through the command line.

Get hands-on with 1200+ tech skills courses.