Amazon Elastic Compute Cloud (EC2)

Introduction

Section Summary

Lesson Summary

In this lesson, we explored Amazon Elastic Compute Cloud (EC2), AWS’s core IaaS offering for provisioning and managing virtual servers in the cloud. You learned key EC2 features, pricing models, scalability options, and the fundamental networking components that make up an AWS deployment.


What Is Amazon EC2?

Amazon EC2 (Elastic Compute Cloud) is a web service launched by AWS in 2006 that lets you rent virtual machines—called instances—to run applications without investing in physical hardware or managing your own data center infrastructure. EC2 instances can be resized, scaled, and configured to meet workloads ranging from development environments to high-performance computing.


Key EC2 Features

1. Instance Families

Choose from multiple instance families optimized for different workloads:

Instance FamilyUse Case
General-purposeBalanced CPU, memory, and networking
Compute-optimizedHigh-performance processors for compute-heavy
Memory-optimizedLarge in-memory databases and caches
Storage-optimizedHigh, local I/O performance
Accelerated computingGPU, FPGA, and machine learning workloads

Note

Selecting the right instance family ensures optimal performance and cost efficiency for your application.

2. Pricing Models

Pricing ModelDescription
On-DemandPay per second with no upfront commitment
Reserved InstancesCommit to 1–3 years for significant discounts
Spot InstancesBid on spare capacity for up to 90% off—and risk interruptions
Savings PlansFlexible pricing model across compute usage

3. Scalability & Reliability

  • On-demand scaling: Launch or terminate instances programmatically.
  • Auto Scaling: Automatically adjust capacity based on policies and health checks.
  • Elastic Load Balancing (ELB): Distribute incoming traffic across multiple instances for fault tolerance.

4. High Availability

  • Spread instances across multiple Availability Zones (AZs) within a Region.
  • Built-in redundancy and rapid failover.

5. Flexible Configurations

  • Choose from dozens of operating systems (Linux, Windows) and preconfigured AMIs.
  • Customize CPU, memory, storage (EBS or instance store), and networking (ENI, IP).

6. AWS Service Integrations

EC2 seamlessly integrates with AWS services, including Amazon S3, AWS Lambda, Amazon RDS, AWS Identity and Access Management (IAM), and Amazon CloudWatch, enabling robust, scalable architectures.


Core Networking Concepts

AWS Account

Your root container for AWS resources, billing, and identity controls.

AWS Region & Availability Zones

  • Region: A geographical area (e.g., us-east-1) with multiple isolated data centers.
  • Availability Zone (AZ): An individual data center with its own power and networking setup.

Amazon VPC

A Virtual Private Cloud where you define your own IP address range, subnets, route tables, and gateways.

Subnets

  • Public Subnet: Instances have direct internet access via an Internet Gateway.
  • Private Subnet: Instances cannot be reached from the internet without a NAT Gateway or proxy.

Internet Gateway

Attaches to your VPC to enable outbound and inbound internet traffic for public subnets.

NAT Gateway

Provides outbound-only internet access for instances in private subnets, blocking inbound connections.

Route Table

Determines how traffic flows within your VPC and to external networks (Internet Gateway, NAT Gateway, peering connections).

Security Group

Stateful virtual firewall at the instance level that controls inbound and outbound traffic based on rules.


Further Reading

Watch Video

Watch video content

Previous
Introduction to NACL