Amazon Elastic Compute Cloud (also known as "EC2") allows users to rent computers on which to run their own computer applications. EC2 allows scalable deployment of applications by providing a web service through which a user can boot an Amazon Machine Image to create a virtual machine, which Amazon calls an "instance", containing any software desired.
A user can create, launch, and terminate server instances as needed, paying by the hour for active servers, hence the term "elastic". EC2 provides users with control over the geographical location of instances which allows for latency optimization and high levels of redundancy. For example, to minimize downtime, a user can set up server instances in multiple zones which are insulated from each other for most causes of failure such that one backs up the other.
Amazon.com provides EC2 as one of several web services marketed under the Amazon Web Services (AWS) brand.
Amazon announced a limited public beta of EC2 on August 25, 2006. Access to EC2 was granted on a first come first served basis. Amazon added two new instance types (Large and Extra-Large) on October 16, 2007. On May 29, 2008, two more types were added, High-CPU Medium and High-CPU Extra Large. There are currently seven types of instances available.
Amazon added three new features on March 27, 2008. These features included static IP addresses, Availability Zones, and User Selectable Kernels. Amazon added Elastic Block Store (EBS) on August 20, 2008. This provides persistent storage, a basic feature which had been lacking since the service was introduced.
Amazon EC2 is in full production since it dropped the beta label on October 23, 2008. On the same day, Amazon announced the following features: a service level agreement for EC2, Microsoft Windows in beta form on EC2, Microsoft SQL Server in beta form on EC2, plans for an AWS management console, and plans for load balancing, autoscaling, and cloud monitoring services. These features were subsequently added on May 18, 2009.
EC2 uses Xen virtualization. Each virtual machine, called an "instance", functions as a virtual private server in one of three sizes; small, large or extra large. Amazon.com sizes instances based on "EC2 Compute Units" — the equivalent CPU capacity of physical hardware. One EC2 Compute Unit equals 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor. The system offers the following instance types:
Instances of this family are well suited for most applications.
Instances of this family offer large memory sizes for high throughput applications, including database and memory caching applications.
Instances of this family have proportionally more CPU resources than memory (RAM) and are well suited for compute-intensive applications.
Amazon primarily charges customers in two ways:
Additional charges for:
The hourly charge for a running virtual machine are based on the resources allocated to the machine (CPU cores memory and storage) as well as licence fees for software pre-installed including Microsoft Windows. Virtual machines can be saved and shutdown for a small fee and don't not incur the hourly fee in that state.
The performance of multiple identical virtual machines may however vary.
Customers can easily create/reboot virtual machines. Shutdown is not available but you can terminate your instance and create another one later, although in this case you will lose data (unless backed up on Amazon S3, or on their network attached storage service EBS).
As of November 2009, Amazon charges $0.084/hour ($61/month) for the smallest "On-Demand" virtual machine running Linux and twelve times that for the largest one running Windows. "Reserved" instances can go as low as $31/month for a three-year prepaid plan. The data transfer charge ranges from $0.08 to $0.15 per gigabyte, depending on the direction and monthly volume.
Amazon does not have monthly minimums or account maintenance charges.
When it launched in August 2006, the EC2 service offered Linux and later Sun Microsystems' OpenSolaris and Solaris Express Community Edition. In October 2008, EC2 added the Windows Server 2003 operating system to the list of available operating systems.
A normal EC2 instance has no persistent storage. They have temporary storage, which remains consistent when an EC2 instance is rebooted, but when the instance is terminated -be it explicitly done so by an API call, or due to a failure of the infrastructure, this store is lost. For applications to retain data over time, persistent storage of one form or another is needed. This may be through one of Amazon's database services, or it may be through their two persistent storage options.
Simple Storage Service (S3) is a storage system in which data is accessible to EC2 instances, or directly over the network to suitably authenticated callers -all communication is over HTTP. Amazon does not charge for the bandwidth for communications between EC2 instances and S3 storage in the same region. Accessing S3 data stored in a different region (for example, data stored in Europe from a US East Coast EC2 instance) will be billed at Amazon's normal rates.
S3-based storage is low cost, as you only pay per gigabyte per month for data stored; unused space is not billed for. However, it does not look like classic, locally mounted file storage, and applications need to be written to use it directly. As an example of this Apache Hadoop supports a special s3: filesystem to support reading from and writing to S3 storage during a MapReduce job. There are also S3 filesystems for Linux, which mount a remote S3 filestore on an EC2 image, as if it were local storage. As S3 is not a full Posix filesystem, things may not behave the same as on a local disk -there is no locking, for example.
The other form of persistence is the Elastic Block Storage (EBS). Here users can set up and manage storage volumes of sizes from 1GB to 1TB. An EBS store can be mounted to a single EC2 instance at a time. When mounted, it appears as a local filesystem, with full Posix functionality. This makes it possible to use EBS as the store for databases and other applications, without their needing to be rewritten to work with the S3 filestore.
Amazon's Auto Scaling feature of EC2 allows it to automatically adapt computing capacity to site traffic.
Amazon's Elastic IP Address feature is similar to static IP address in traditional data centers, with one key difference. A user can programmatically map an Elastic IP Address to any virtual machine instance without a network administrator's help and without having to wait for DNS to propagate the new binding. In this sense an Elastic IP Address belongs to the account and not to a virtual machine instance. It exists until it is explicitly removed. IPv6 is not yet provided.
Amazon CloudWatch is a web service that provides real-time monitoring to Amazon's EC2 customers on their resource utilization such as CPU,disk, network and memory. The data is aggregated and provided through AWS management console. It can also be accessed through command line tools and web API's if the customer desires to monitor their EC2 resources through their enterprise monitoring software.
The metrics collected by Amazon CloudWatch enables Auto Scaling feature to dynamically add or remove EC2 instances. The customers are charged by the number of monitoring instances.
Reserved instances enable EC2 service users to reserve an instance for one or three years. Although there is a fee associated with reserving an instance, the corresponding per hour rate charged by Amazon to operate the instance is much less than the rate charged for non-reserved instances.
Other companies which rent their own cloud infrastructure with minimum restrictions on the implementation of hosted applications, operating systems or databases.