Intro to EC2

The Elastic Compute Cloud (EC2) was one of the first services released by AWS all the way back in 2006. At that time most people in the IT industry knew about virtual servers (VMs) thanks to vendors like VMWare. But AWS was the first one to offer these servers in an on-demand, pay-as-you-go fashion. Anyone with a credit card could go to the AWS website, create an account, and instantly start launching VMs.

The EC2 feature set was very limited back in 2006. There was only one instance type (i.e. hardware model). There was no persistent storage option. If an VM crashed, it was gone forever. It was the epitome of minimum viable product.

Fast-forward to today and things are much different. There are plenty of instance types, advanced storage, networking, and monitoring options. It is an enterprise class service that is used by companies large and small all across the world. The service has truly come a long way since its humble beginnings.

What is EC2?

At its very core, EC2 is a custom virtual server application. Amazon doesn't share many details about the underlying technology. They have shared that EC2 is a customized version of the open source Xen hypervisor.

In this lesson we will explore some of the characteristics of the EC2 service.

Full Control

When you provision an EC2 instance you are the only one who has administrator access. For Linux that means you get root access; Windows users will get a local admin acccount. No one at AWS has the ability to access the operating system of your instances.

Choose Your OS

During the provisioning process you will are able to choose from a list of supported operating systems. The services supports many Linux distributions including RedHat, CentOS, & Ubuntu. AWS also offers a version of Linux aptly named Amazon Linux.

AWS also has a partnership with Microsoft that allows customers to launch different versions of the Windows operating system.

API Enabled

One of the major differentiators that helped separate EC2 from others in the market was that it had an API. This let developers start, modify, and launch EC2 instances from the command line or their applications. This turned out to be a groundbreaking move as it gave developers the power to control infrastructure using the tools and programming languages they were skilled in.

On-Demand & Instantly Scalable

Anoter key feature of EC2 is that is an on-demand service. That means that you can make an API call to start an instance, and within minutes have access to the operating system. And this isn't just one or two servers. Customers routinely launch dozens or even hundreds of instances throughout the day.

In addition, because the instances are API enabled, and instantly-scalable, programmers can create applications that can provision and destroy computing resources as needed.

Pay-per-Use

Before cloud computing, most customers had limited choices on how they paid for server resources. Companies could buy servers and storage from HP and Dell for large upfront payments, or provision from colos on a monthly basis.

EC2 was the first offering to allow for per hour billing. Anyone could start a server for an hour and receive a bill for $0.10.

Range of Hardware

The last thing to note is that there is a range of hardware available. The EC2 service offers Instance Types that match various computing workloads. They have instance types for workloads such as databases, applications, etc.

Anatomy of an EC2 Instance

At its core EC2 provides virtual servers in an on-demand fashion. While that sounds simple enough, the truth is that there are quite a few details around it. In this lesson we will explore the anatomy of an EC2 instance.

The following diagram shows the internal parts of an EC2 instance, along with some external resources that it interacts with.

Let's talk about how these things work.

Location

While not part of the instance per se, the location is very important. Specifying the location is a requirement when launching an instance. This is a combination of both the Region and Availability Zone.

Host OS

The host OS is the system managed by AWS. This is the custom hypervisor that is the core of the EC2 service.

Guest OS\/AMI

At the heart of an EC2 instance is the guest OS. This is either a Windows or Linux operating system. The EC2 OS are delivered via a feature called an Amazon Machine Image (AMI). AMIs are at the very least a copy of an OS, but can also be packaged with applications.

Third-parties can create and share AMIs. Customers can also create their own private and public AMIs.

HW Resources

Each EC2 instance has a fixed amount of CPU and RAM. The power of each is determiend by the instance type selected at the instance start. These are hard provisioned and not shared by other VMs on the same physical host (with the exception of the T2 instance types).

Security Group

EC2 instances come with a firewall feature called a Security Group. Security groups provide a stateful firewall that is in full control of the customer. By default all ports are closed. Customers can then open ports as needed.

Network\/IP Address

Each EC2 instance has one network card that is shared by other hosts on the physical server. AWS does not guarantee a dedicated bandwidth amount for each instance type. However, they do provide guidance on how much bandwidth an instance can expect.

For addressing, each instance will get at least one private IP address. Customers can elect to have a public IP address assigned as well. Additionally, you can create a Elastic Network Interface (ENI) and attach it to an instance to gain additional private IP addresses.

The public IP address can either be auto-assigned by EC2, or alternatively, you can provision an ElasticIP. ElasticIPs are assigned to your AWS account and can be moved between instances at your will.

Local Instance Store

There are two types of storage available to EC2 instances. One is called Instance Store. This is local storage that is either magnetic or SSD based, depending on the instance type. The size of the instance store is also determined by the instance type.

Customers need to use this with caution. Local instance store is ephemeral, meaning that if you were to shutdown the instance the data on these volumes would be erased. For persistent data requirements customers are advised to use the EBS Volumes (covered next).

EBS Volumes

Elastic Block Storage (EBS) is a persistent storage service provided by AWS. This service provides traditional magnetic storage volumes, or SSD volumes. Magnetic volumes can be up to 1TB in size; SSD volumes can be up to 16TB in size.

The volumes are network based, meaning the EC2 instance communicates with them over its network interfaces. The performance of these volumes depends on the type (magnetic or SSD), size, and whether provisioned IOPs are configured. You can refer to this link for more information about it.

Keypair

In order to provide access to the instance operating system, you are required to create a keypair. The keypair is made up of a private key and public key. When creating a keypair you will download the private key (you can only retrieve this one time). EC2 will hold a copy of public key. When you start a new instane, the public key is added to the

results matching ""

    No results matching ""