AWS Solutions Architect · Module 3 · Day 8

Amazon EC2 and Its Features

⏱ 16 min read🎯 Beginner friendly🖼 2 diagrams🧪 4 live demos

Amazon EC2 is AWS’s most important service: virtual servers you rent by the second. The best way to understand it is to take a traditional server room and find the EC2 feature that replaces each part. By the end, every screen of “Launch instance” will make sense.

In this session

  • EC2 in one line
  • Traditional IT → EC2: the 11-part map
  • Instances, AMIs and instance types (live decoder)
  • EBS vs instance store
  • Key pairs, security groups, tags and Elastic IPs
  • Pricing: On-Demand, Savings Plans, Spot
  • Hands-on: spot each feature while launching

01What is Amazon EC2?

WordMeaning
Elasticstretches and shrinks: add servers when busy, remove them when quiet
Computeprocessing power (CPU, RAM) to run your apps
Clouddelivered over the internet, pay-as-you-go
EC2 gives on-demand, scalable computing capacity. An EC2 instance is one virtual server in the AWS Cloud.
🚗

Like renting a car. Pick a model (small hatchback or big SUV), use it as long as you need, return it, and pay only for the time you used it.

02Traditional IT → EC2: the map

Traditional ITEC2 featureWhat it does
Physical serverInstancethe virtual server itself
OS & softwareAMItemplate with the OS and software
Server hardware (CPU, RAM)Instance typethe hardware size, e.g. t3.micro
Hard disksEBS volumepermanent network disk
Built-in scratch diskInstance storefast temporary disk, wiped on stop
Username / passwordKey pairpublic key on AWS, private key with you
FirewallSecurity groupwhich ports and IPs may connect
Office LANVPCyour private network
Server roomRegion & AZwhere it physically runs
Stickers / labelsTagsName=web-01, Env=prod
Public IP from the ISPElastic IPfixed public address
Demo · Match it

03Instances, AMIs and instance types

Instance lifecycle: launch → pending → running ⇄ stopped → terminated. Stop = like shutting down (disk kept, no compute charge, disk still billed). Terminate = deleted forever. Linux is billed per second (minimum 60 seconds).

AMI sourceExamples
AWS-providedAmazon Linux 2023, Ubuntu, Red Hat, Windows Server
AWS Marketplaceready images from vendors (WordPress, firewalls), sometimes paid
Communityshared by others: check carefully
My AMIsmake your own from a configured instance, then launch identical copies

The instance type sets CPU, memory, storage, network and GPU. Decode any name here:

Demo · Instance type decoder
FamilyOptimised forExample use
T, M general purposebalancedwebsites, small apps
C computeCPUbatch jobs, gaming, video encoding
R, X memoryRAMbig databases, caches
I, D storagefast local diskNoSQL, data warehouses
P, G, Inf, Trn acceleratedGPUs / AI chipsmachine learning, graphics
Memory trick: C = CPU, R = RAM, I = I/O (disk), G = graphics, T = tiny / burstable.

04EBS vs instance store

EBS volume• network disk, PERSISTENT• data kept after stop• one AZ; detach and reattach• snapshots (backups)• OS, databases, anything importantInstance store• disk inside the host, very fast• data LOST on stop or terminate• cannot detach• no snapshots• cache, buffers, temporary files
EBS is an external hard disk; instance store is a whiteboard wiped when you leave the room.
EBS typeKindUse
gp3general purpose SSDdefault for most workloads
io2provisioned IOPS SSDcritical databases
st1throughput HDDbig sequential data, logs
sc1cold HDDrarely used data, lowest cost

05Key pairs, security groups, tags and Elastic IPs

Your laptopprivate key (.pem)SSH · port 22must be allowed by the security groupEC2 instancepublic key inside
AWS keeps the public key (the lock); you keep the private key (the key). AWS never keeps a copy of your private key.
Security group rulePortSource
SSH (admin login, Linux)22My IP only, e.g. 49.36.10.5/32
HTTP (website)800.0.0.0/0 (anyone)
HTTPS (secure website)4430.0.0.0/0
Outbound: all trafficall0.0.0.0/0 (default)

06How you pay for EC2

OptionDiscountBest for
On-Demandnoneshort, unpredictable work, testing
Savings Plansup to ~72%steady use with a 1- or 3-year commitment
Reserved Instancesup to ~72%steady use of one instance type
Spot Instancesup to ~90%jobs that can be interrupted (batch, CI, big data)
Dedicated Hostspremiumlicensing or compliance needing your own hardware
Demo · Pick the pricing option
Demo · Do it yourself
🎯 Exam corner
  • Data must survive stop/start → EBS. Fastest temporary disk → instance store.
  • Interruptible batch → Spot. Steady 24×7 → Savings Plans / RIs.
  • Launch many identical servers → custom AMI. Fixed public IP → Elastic IP.

07Summary

08Quick quiz

1. Which EC2 feature replaces “OS & software”?

2. In c7g.xlarge, “g” means…

3. Data must survive a stop/start. Use…

4. Can a security group have a deny rule?

5. Cheapest for interruptible batch jobs?

09References

Created by Ajeetkumar