The Linux Cloud on AWS: use Linux skills to power cloud deployments


Why the Linux Cloud is a really big deal and what you have to know to start taking full advantage of it.

The fact is, since they probably constitute only around 2% of the total consumer PC market, you may not see all that many desktop and laptop machines running Linux. But the connected infrastructure holding the Internet together is a different matter altogether.
If you’re running a server, mainframe, supercomputer, embedded system, gaming console, network router, and (through Android) smart phones, then the odds are overwhelming that you’re working with Linux. And Cloud Computing? Let’s just call it the Linux Cloud.
As of last year, Google was said to regularly launch over two billion virtual Linux containers per week. Even Microsoft’s Azure will now host Linux instances. But the undisputed market leader in the Cloud Computing market is AWS and, at least as of late last year, 74% of all AWS instances were reportedly powered by Linux.
“Linux cloud” machines are generally cheaper to run, quicker to scale and, for all intents and purposes, better documented than the competition. All this means that Linux cloud deployments are only going to become more common. If you’re out to get things done in the cloud, this is one train you really don’t want to miss.
Cloud Academy has now published the first five courses in our LPIC Server Professional Linux certification series. These five courses cover all the material needed to take and pass the LPIC-1 101 exam. (The remaining courses aimed at the second exam, should appear over the next weeks.) If you want to really understand how Linux systems – the backbone of the Internet – work, consider taking these courses.
But in the meantime, here are some basic, must-have concepts and skills that will at least get you started with Linux instances on AWS.

Optimized “Linux Cloud” distributions

The AWS Marketplace (when accessed through the EC2 Launch Instance process), offers all kinds of pre-built Linux images, mostly available for free. While there are many very specialized images (like the OpenVPN image, for example), the two most popular general choices are probably Amazon Linux and Ubuntu Server. Both of these images are specially optimized Linux cloud distributions, and were built with AWS very much in mind.
Whether either one of these has a clear performance advantage over the other will probably depend on your specific needs. Amazon Linux – which is based on the CentOS distribution – is obviously deeply integrated with the larger AWS infrastructure and comes with Amazon Tools installed by default. On the other hand, Ubuntu, since it uses the Debian repositories, will have native access to a staggering range of installable software.
One consideration is Amazon Linux’s approach to updates. Since the 2011.09 release, Amazon Linux images are all automatically updated to the most current version available. Most of the time, this works well. However, there may be scenarios where an unexpected update could break an important configuration. If you’re concerned about this, pass this user data to your instance upon launch:

repo_releasever: 2014.03

Administrative Permissions

Since just about everything that happens on a Linux system starts with a plain text file of some sort or another, controlling the permissions for sensitive system files and directories is critically important. For our purposes, read, write, and/or execution access to each file and directory is defined for its owner, group, and/or others. If you need to edit or create files for which you don’t normally have rights, most Linux distributions allow you to temporarily assume admin powers by prefacing your command with sudo (and, when prompted, providing your password), like this:

# Install the Apache web server from a repository:
$ sudo yum install httpd

But that assumes that your user account is allowed to invoke sudo. For that to be true, your user would have to be part of an admin group. Many Linux distributions (Red Hat, Fedora, etc.) assign root privileges to all members of the wheel group. Practically, this is done by adding the wheel group (and therefore, its members) to the sudoers file (/etc/sudoers). Debian and Ubuntu do effectively the same thing, but they call the group “sudo” instead of wheel.
By default, the wheel group on an Amazon Linux machine is not included in the sudoers file, although accessing the instance through SSH using a valid AWS keypair will give you full administration rights, and full access to specific services using the SDK or other tools can be opened up through IAM policies. Should your specific needs require enabling root access for the wheel (or sudo) group, AWS documents the process.

System monitoring

AWS offers their own integrated monitoring tools, most notably, CloudWatch. But you might sometimes need to dig a bit deeper into a particular instance. Running

$ top

…from the command line will display the top resource-consuming processes and associated data in real time. The output will look like this:
Linux Cloud
You may also want to view the system logs that live in the /var/log directory tree:

$ cd /var/log
$ ls
apt       cloud-init-output.log  dmesg.0    lastlog              upstart
auth.log  cloud-init.log         fsck       syslog               wtmp
boot.log  dist-upgrade           kern.log   udev
btmp      dmesg                  landscape  unattended-upgrades

Other Linux cloud skills

If you want to enjoy a relatively smooth flight through the Linux cloud, you’ll definitely want at least a basic grasp of Linux scripting and database  management. Working with script-based AWS services like CloudFormation or the EC2 Container Service will go much better if you’re already familiar with the way scripts work natively within Linux itself. And even something as simple as passing commands to an AWS instance at launch time through shell scripts or cloud-init directives will require some scripting experience.
Similarly, connecting to an AWS RDS (Relational Database Service) instance will be a whole lot easier if you’ve done it already within a local installation of Linux.
The bottom line is that, in most cases at least, serious Cloud Computing will require some serious use of the Linux Cloud. If you’re not yet completely comfortable with the core Linux skills, consider taking Cloud Academy’s LPIC Linux Server Professional certification courses.

Written by

A Linux system administrator with twenty years' experience as a high school teacher, David has been around the industry long enough to have witnessed decades of technology trend predictions; most of them turning out to be dead wrong.

Related Posts

— November 28, 2018

Two New EC2 Instance Types Announced at AWS re:Invent 2018 – Monday Night Live

Let’s look at what benefits these two new EC2 instance types offer and how these two new instances could be of benefit to you. Both of the new instance types are built on the AWS Nitro System. The AWS Nitro System improves the performance of processing in virtualized environments by...

Read more
  • AWS
  • EC2
  • re:Invent 2018
— November 21, 2018

Google Cloud Certification: Preparation and Prerequisites

Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2018, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the first time. In t...

Read more
  • AWS
  • Azure
  • Google Cloud
Khash Nakhostin
— November 13, 2018

Understanding AWS VPC Egress Filtering Methods

Security in AWS is governed by a shared responsibility model where both vendor and subscriber have various operational responsibilities. AWS assumes responsibility for the underlying infrastructure, hardware, virtualization layer, facilities, and staff while the subscriber organization ...

Read more
  • Aviatrix
  • AWS
  • VPC
— November 10, 2018

S3 FTP: Build a Reliable and Inexpensive FTP Server Using Amazon’s S3

Is it possible to create an S3 FTP file backup/transfer solution, minimizing associated file storage and capacity planning administration headache?FTP (File Transfer Protocol) is a fast and convenient way to transfer large files over the Internet. You might, at some point, have conf...

Read more
  • Amazon S3
  • AWS
— October 18, 2018

Microservices Architecture: Advantages and Drawbacks

Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs).Microservices have become increasingly popular over the past few years. The modular architectural style,...

Read more
  • AWS
  • Microservices
— October 2, 2018

What Are Best Practices for Tagging AWS Resources?

There are many use cases for tags, but what are the best practices for tagging AWS resources? In order for your organization to effectively manage resources (and your monthly AWS bill), you need to implement and adopt a thoughtful tagging strategy that makes sense for your business. The...

Read more
  • AWS
  • cost optimization
— September 26, 2018

How to Optimize Amazon S3 Performance

Amazon S3 is the most common storage options for many organizations, being object storage it is used for a wide variety of data types, from the smallest objects to huge datasets. All in all, Amazon S3 is a great service to store a wide scope of data types in a highly available and resil...

Read more
  • Amazon S3
  • AWS
— September 18, 2018

How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy

One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...

Read more
  • AWS
  • Azure
  • Google Cloud
— August 23, 2018

What are the Benefits of Machine Learning in the Cloud?

A Comparison of Machine Learning Services on AWS, Azure, and Google CloudArtificial intelligence and machine learning are steadily making their way into enterprise applications in areas such as customer support, fraud detection, and business intelligence. There is every reason to beli...

Read more
  • AWS
  • Azure
  • Google Cloud
  • Machine Learning
— August 17, 2018

How to Use AWS CLI

The AWS Command Line Interface (CLI) is for managing your AWS services from a terminal session on your own client, allowing you to control and configure multiple AWS services.So you’ve been using AWS for awhile and finally feel comfortable clicking your way through all the services....

Read more
  • AWS
Albert Qian
— August 9, 2018

AWS Summit Chicago: New AWS Features Announced

Thousands of cloud practitioners descended on Chicago’s McCormick Place West last week to hear the latest updates around Amazon Web Services (AWS). While a typical hot and humid summer made its presence known outside, attendees inside basked in the comfort of air conditioning to hone th...

Read more
  • AWS
  • AWS Summits
— August 8, 2018

From Monolith to Serverless – The Evolving Cloudscape of Compute

Containers can help fragment monoliths into logical, easier to use workloads. The AWS Summit New York was held on July 17 and Cloud Academy sponsored my trip to the event. As someone who covers enterprise cloud technologies and services, the recent Amazon Web Services event was an insig...

Read more
  • AWS
  • AWS Summits
  • Containers
  • DevOps
  • serverless