AWS SAA – Lecture 32: EC2 Basics

Published on
Written by Henry Nguyen

Phase Verbs / Action Phrases

PhraseMeaning
rent (virtual machines)pay to use compute resources without owning hardware
configure (an instance)choose OS, CPU, RAM, storage, network settings
bootstrap (an instance)run startup commands automatically on first launch
distribute (load)spread traffic across multiple instances
scale (services)increase or decrease compute capacity automatically

Technical Vocabulary

TermDefinition
EC2 (Elastic Compute Cloud)AWS’s most popular IaaS service — rent virtual servers on demand
EC2 InstanceA single virtual server rented from AWS
IaaS (Infrastructure as a Service)Cloud model where you rent the infrastructure (servers, networking)
EBS (Elastic Block Store)Network-attached persistent storage for EC2
EFS (Elastic File System)Managed file system for EC2 (shared across instances)
EC2 Instance StoreHardware-attached storage (ephemeral, but very fast)
Elastic Load Balancer (ELB)Distributes incoming traffic across multiple EC2 instances
Auto Scaling Group (ASG)Automatically adds/removes EC2 instances based on demand
Security GroupVirtual firewall controlling inbound/outbound traffic to an EC2 instance
EC2 User DataA bootstrap script that runs once when an instance first starts
BootstrappingAutomating setup tasks (install software, download files) at first boot
AMIAmazon Machine Image — a template for launching EC2 instances (includes OS + config)

Key Concepts

What is EC2?

  • Stands for Elastic Compute Cloud
  • Lets you rent virtual machines called EC2 instances
  • Covers more than just VMs — it is the full compute stack:
    • Virtual machines → EC2 instances
    • Storage → EBS volumes (network-attached)
    • Load balancing → ELB
    • Auto-scaling → ASG

What You Configure Per Instance

DimensionChoices
Operating SystemLinux (most common), Windows, macOS
CPUNumber of cores
RAMAmount of memory
StorageNetwork-attached (EBS/EFS) or hardware-attached (Instance Store)
NetworkSpeed, public IP assignment
FirewallSecurity Group rules
Startup ScriptEC2 User Data

EC2 User Data

  • A bash/shell script you provide at launch
  • Runs once only — on first start
  • Purpose: automate boot tasks (install updates, install software, download files)
  • Runs as the root user (has sudo rights)

Exam Tips

  • EC2 = “Infrastructure as a Service” — renting compute on demand
  • Know the 6 dimensions you configure: OS, CPU, RAM, storage, network, firewall
  • User Data script: runs once, at first launch, as root
  • EBS = network-attached (persistent); Instance Store = hardware-attached (ephemeral)