Search This Blog

Friday 17 July 2015

Know Thy Instance - Lighting the LAMPS

One of the first things you do after signing up with AWS is creating an EC2 instance. In simpler terms, this is the machine that you want to put up on the cloud. The AWS user interface is fairly straight forward and within minutes you can get your first cloud server up and running. However, I think that it’s best to understand what choices we have when choosing an instance…

I use the acronym LAMPS to easily remember important Instance choices:

  1. L (Location)
  2. A (AMI)
  3. M (Machine aka Hardware)
  4. P (Pricing)
  5. S(Storage)

The visualization and the following table will help you understand the LAMPS in better detail:

(Click on the image to get the larger version)

Choosing an EC2 Instance

 

Your Choice What it defines… Description

Location

Where will your machine be located?

AWS has it’s data centers in US, EU, APAC and Brazil. When you create a virtual machine, you can specify which data center should host your machine. This is basically your “Region”.
A region is comprised of a set of what are called “availability zones”. More than one zone can be leveraged for disaster recovery purposes i.e. if one of your instance fails then another instance in a different availability zone can take over.
<<Availability zones cannot span multiple regions.>>

AMI

What is the OS and applications you want to run?

AMI is the acronym for Amazon Machine Image. Think of it as a box that holds your OS and required applications. You can simply unpack the box and start running it. AMIs can be obtained from AWS Marketplace (Paid) or from the AWS Community (Free). You can also create your own AMI and share it with the community.

Machine

What kind of usage are you planning?

AWS provides you machines with pre-configured hardware taking into account the typical uses. The options with examples are:

  1. General purpose – Web servers
  2. Compute optimized – Computational Fluid Dynamics
  3. Memory optimized- Analytics applications
  4. GPU - Video Processing
  5. Storage Optimized – Big Data

For a particular type of machine you can also select the size – ranging from micro, small, medium large to 2xlarge, 4xlarge or 8xlarge. Note: Not all sizes are available for all machine types.

<<Can custom machines be created?>>

Pricing

How much will it cost?

Few of the instances can be used for free. For others, Amazon offers the following payment options -

  1. On-demand instances – Pay as you use
  2. Reserved instances – 1 to 3 year commitment, some upfront payment may be required.
  3. Spot instances - “Bidding” for Amazon instances that are unused. Be careful here because if anybody else bids a higher amount, your instance will be terminated immediately and provided to the highest bidder.

Storage

Where to store all your application data?

So what do you do when you have the AMI and the hardware? Start running it! AWS by default creates a temporary storage to run the AMI. This is called the EC2 instance store. You don’t need to pay any additional cost for this storage. However, all data in an instance store will be lost when the instance terminates.

A better solution is to use something called the Elastic Block Store (EBS). You need to pay for using EBS. However, EBS provides permanent storage with the ability to provision IOPS (Input/Output Operations per seconds) according to your application’s needs.

The third type of storage is called Simple Storage Service (S3). You do not run your AMIs on S3 as it would be too slow. Think of S3 as a repository to hold your data. A good use case for S3 would be to use it as a content delivery network (CDN).

 

Now that you have chosen the instance, it’s time to understand how it can be configured or in other words it’s time to Unpack the KITS!

No comments:

Post a Comment