Amazon Elastic Compute Cloud (EC2)

Introduction

Background what and why of EC2

Welcome to this introductory lesson on Amazon Elastic Compute Cloud (EC2). In this guide, we’ll explore the evolution of compute, the limitations of traditional data centers, and how EC2 transforms the way you deploy and manage applications in the cloud.

Challenges of Traditional Data Centers

In the 1980s and 1990s, organizations depended on on-premises data centers, facing:

  • Lengthy Provisioning
    Ordering, racking, and configuring hardware could take weeks or months.
  • High Upfront Costs
    Capital expenditures for servers, networking, and storage were significant.
  • Maintenance Overhead
    Hardware failures, patch management, and firmware upgrades required dedicated teams.
  • Limited Agility
    Scaling up or down on demand was virtually impossible without overprovisioning.

To accommodate peak loads, companies often overestimated capacity, tying up capital and reducing operational flexibility.

Emergence of Virtualization

The early 2000s saw the rise of virtualization, which enabled multiple virtual machines (VMs) to run on a single physical server. Key benefits included:

  • Improved Resource Utilization
  • Faster Recovery and simplified maintenance
  • On-Demand Flexibility for deploying new workloads

Virtualization set the stage for cloud computing by decoupling hardware from software.

Introducing Amazon EC2

Amazon EC2 (launched in 2006) provides secure, resizable compute capacity in the AWS Cloud. Instead of procuring physical servers, you launch virtual instances with the CPU, memory, storage, and networking capacity you need.

The image illustrates the evolution of compute resources, focusing on AWS EC2 introduced in 2006, showing a user creating resources in the AWS Cloud with EC2 instances running on a hypervisor and physical server in the US-east-1 region.

Note

With EC2, provisioning a new server takes minutes instead of months—accelerating development cycles and innovation.

Key Features of Amazon EC2

Amazon EC2 offers a rich set of features to support diverse workloads:

1. Instance Families

Choose from multiple instance families optimized for different use cases:

Instance FamilyUse CaseExample Types
General PurposeBalanced CPU & memoryt3.micro, m5.large
Compute OptimizedCompute-intensive applicationsc5.large, c6g.medium
Memory OptimizedMemory-bound workloadsr5.xlarge, x1e.2xlarge
Storage OptimizedHigh I/O performancei3.large, d3en.4xlarge
Accelerated ComputingGPU/FPGA-based parallel processingp3.2xlarge, f1.4xlarge

2. Flexible Pricing Models

Optimize costs with multiple pricing options:

Pricing ModelDescriptionBest For
On-DemandPay per second for compute resourcesShort-term, unpredictable workloads
Reserved InstancesCommit to 1–3 year term for discountsSteady-state, long-running workloads
Spot InstancesBid on spare capacity for up to 90% off On-DemandFault-tolerant, flexible applications
Savings PlansFlexible discount model across compute usagePredictable usage across AWS services

Warning

Provisioning the wrong instance type or pricing model can lead to unexpected costs. Always analyze your workload patterns first.

3. High Availability & Reliability

  • Regions & Availability Zones
    Distribute instances across multiple AZs for fault tolerance.
  • Automated Hardware Replacement
    AWS monitors and remediates failed hardware.

Learn more: AWS Regions and Availability Zones

4. Elastic Scaling

  • Auto Scaling
    Automatically adjust capacity in response to demand.
  • Elastic Load Balancing
    Distribute incoming traffic across healthy instances.

Learn more: Amazon EC2 Auto Scaling, Elastic Load Balancing

5. Customization & Control

  • Amazon Machine Images (AMIs)
    Preconfigure OS, application server, and applications.
  • User Data & CloudInit
    Automate instance initialization scripts.

Learn more: AMI Overview

6. Integration with AWS Services

EC2 works seamlessly with the broader AWS ecosystem:

ServicePurpose
Amazon S3Object storage
Amazon RDSManaged relational databases
AWS VPCVirtual networking
AWS IAMSecure access control
AWS CloudWatchMonitoring and observability

Watch Video

Watch video content

Previous
Course Overview