Amazon EC2 allows businesses to run virtual machines in AWS data centers, providing scalable compute capacity. Developers can launch EC2 instances running various operating systems and application programs. Instances can be increased or decreased on demand or through reserved contracts. EC2 offers multiple instance types optimized for different workloads. Developers pay hourly for on-demand instances or get discounts with 1-3 year reserved contracts. EC2 provides easy scaling but developers must manage resources and security across many instances.
2. Introduction
Amazon Elastic Compute Cloud (Amazon EC2) is a web-based service
that allows businesses to run application programs in the Amazon Web
Services.
Amazon EC2 allows a developer to spin up virtual machines, 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).
3. 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.
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.
4. 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.
5. Cost
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.
6. Benefits
6
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.
7. Challenges
7
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