Amazon Elastic Compute Cloud (Amazon EC2) is a web-based service that allows businesses to run application programs in the Amazon Web Services (AWS) public cloud. Amazon EC2 allows a developer to spin up virtual machines (VMs), which provide compute capacity for IT projects and cloud workloads that run with global AWS data centers.
An AWS user can increase or decrease instance capacity as needed within minutes using the Amazon EC2 web interface or an application programming interface (API). A developer can code an application to scale instances automatically with AWS Auto Scaling. A developer can also define an autoscaling policy and group to manage multiple instances at once.Content Continues Below
EC2 was the idea of engineer Chris Pinkham who conceived it as a way to scale Amazon's internal infrastructure. Pinkham and engineer Benjamin Black presented a paper on their ideas to Amazon CEO Jeff Bezos, who liked what he read and requested details on virtual cloud servers.
EC2 was then developed by a team in Cape Town, South Africa. Pinkham provided the initial architecture guidance for EC2, gathered a development team and led the project along with Willem van Biljon.
In 2006, Amazon announced a limited public beta test of EC2, and in 2007 added two new instance types -- Large and Extra-Large. Amazon announced the addition of static IP addresses, availability zones, and user selectable kernels in spring 2008, followed by the release of the Elastic Block Store (EBS) in August.
Amazon EC2 went into full production on October 23, 2008. Amazon also released a service level agreement (SLA) for EC2 that day, along with Microsoft Windows and SQL Server in beta form on EC2. Amazon added the AWS Management Console, load balancing, autoscaling, and cloud monitoring services in 2009.
How EC2 works
To begin using EC2, developers sign up for an account at Amazon's AWS website. They can then use the AWS Management Console, the AWS Command Line Tools (CLI), or AWS Software Developer Kits (SDKs) to manage EC2.
A developer then chooses EC2 from the AWS Services dashboard and 'launch instance' in the EC2 console. At this point, they select either an Amazon Machine Image (AMI) template or create an AMI containing an operating system, application programs, and configuration settings. The AMI is then uploaded to the Amazon S3 and registered with Amazon EC2, creating an AMI identifier. Once this has been done, the subscriber can requisition virtual machines on an as-needed basis.
Data only remains on an EC2 instance while it is running, but a developer can use an Amazon Elastic Block Store volume for an extra level of durability and Amazon S3 for EC2 data backup.
VM Import/Export allows a developer to import on-premises virtual machine images to Amazon EC2, where they are turned into instances.
EC2 also offers Amazon CloudWatch which monitors Amazon cloud applications and resources, allowing users to set alarms, view graphs, and get statistics for AWS data; and AWS Marketplace, an online store where users can buy and sell software that runs on AWS.
Amazon EC2 instance types
Instances allow developers to expand computing capabilities by 'renting' virtual machines rather than purchasing hardware. An EC2 instance is used to run applications on the Amazon Web Services infrastructure.
Amazon EC2 provides different instance types, sizes and pricing structures designed for different computing and budgetary needs. In addition to general purpose instances, Amazon EC2 offers an instance type for compute, memory, accelerated computing, and storage-optimized workloads. AWS limits how many instances a user can run in a region at a time, depending on the type of instance. Each instance type comes with different size options corresponding to the CPU, memory and storage needs of each enterprise.
On-Demand instances allow a developer to create resources as needed and to pay for them by the hour. Reserved instances (RIs) provide a price discount in exchange for one and three-year contract commitments -- a developer can also opt for a convertible RI, which allows for the flexibility to change the instance type, operating system or tenancy. There's also an option to purchase a second-hand RI from the Amazon EC2 reserved instances marketplace. A developer can also submit a bid for spare Amazon EC2 capacity, called Spot instances, for a workload that has a flexible start and end time. If a business needs dedicated physical server space, a developer can opt for EC2 dedicated hosts, which charge hourly and let the business use existing server-bound software licenses, including Windows Server and SQL Server.
Getting started with EC2 is easy, and because EC2 is controlled by APIs developers can commission any number of server instances at the same time to quickly increase or decrease capacity. EC2 allows for complete control of instances which makes operation as simple as if the machine were in-house.
The flexibility of multiple instance types, operating systems, and software packages and the fact that EC2 is integrated with most AWS Services -- S3, Relational Database Service (RDS), Virtual Private Cloud (VPC) -- makes it a secure solution for computing, query processing, and cloud storage.
Resource utilization -- developers must manage the number of instances they have to avoid costly large, long-running instances.
Security -- developers must make sure that public facing instances are running securely.
Deploying at scale -- running a multitude of instances can result in cluttered environments that are difficult to manage.
Management of AMI lifecycle -- developers often begin by using default Amazon Machine Images. As computing needs change, custom configurations will likely be required.
Ongoing maintenance -- Amazon EC2 instances are virtual machines that run in Amazon's cloud. However, they ultimately run on physical hardware which can fail. AWS alerts developers when an instance must be moved due to hardware maintenance. This requires ongoing monitoring.
EC2 vs. S3
Both Amazon EC2 and Amazon S3 are important services that allow developers to maximize use of the AWS cloud. The main difference between Amazon EC2 and S3 is that EC2 is a computing service that allows companies to run servers in the cloud. While S3 is an object storage service used to store and retrieve data from AWS through the Internet. S3 is like a giant hard drive in the cloud, while EC2 offers CPU and RAM in addition to storage. Many developers use both services for their cloud computing needs.
Check out our AWS EC2 guide to learn more about how the cloud service works and help you decide if it is the right choice for your organization.
Learn more about the the features and benefits of deploying AWS cloud services in the enterprise.