100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
AWS

EC2 Fundamentals

Learn what Amazon EC2 is, how virtual server instances work in the cloud, and how to launch, connect to, and manage them safely.

ComputeBeginner9 min readJul 10, 2026
Analogies

What Is Amazon EC2?

Amazon Elastic Compute Cloud (EC2) lets you rent virtual servers, called instances, by the second instead of buying physical hardware. Each instance is launched from an Amazon Machine Image (AMI) — a template containing an operating system and pre-installed software — and runs on AWS's shared physical infrastructure while appearing to you as an isolated machine with its own CPU, memory, storage, and network interface. Because instances can be created and destroyed through an API call, EC2 turns compute capacity into an elastic resource you scale up or down as demand changes, rather than a fixed asset you plan around for years.

🏏

Cricket analogy: Renting an EC2 instance is like a franchise signing an overseas player for just one IPL season instead of drafting them for a ten-year contract — you get MS Dhoni-level firepower exactly when you need it and release the roster slot once the tournament ends.

AMIs, Key Pairs, and Launching an Instance

Launching an instance requires four key decisions: which AMI to boot from, which instance type sizes the CPU and memory, which key pair provides SSH access, and which security group acts as a virtual firewall controlling inbound and outbound traffic. AWS publishes AMIs for common operating systems like Amazon Linux 2023 and Ubuntu, and you can also create your own custom AMI from a configured instance to standardize deployments. The key pair's private half never leaves your machine — AWS only stores the public half on the instance — so losing the private key means losing password-based recovery options unless you use tools like EC2 Instance Connect or Systems Manager Session Manager.

🏏

Cricket analogy: Choosing an AMI is like picking a pre-set fielding template — say, an aggressive powerplay field with two slips — before the match starts, so the team takes the field already configured for the situation instead of arranging positions from scratch.

bash
# Launch a t3.micro instance from an Amazon Linux 2023 AMI
aws ec2 run-instances \
  --image-id ami-0c101f26f147fa7fd \
  --instance-type t3.micro \
  --key-name my-ec2-keypair \
  --security-group-ids sg-0123456789abcdef0 \
  --subnet-id subnet-0123456789abcdef0 \
  --count 1 \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=web-server-01}]'

# Connect once running
ssh -i my-ec2-keypair.pem ec2-user@<public-ip-address>

Connecting to and Inspecting a Running Instance

Once an instance is running, you typically connect over SSH on port 22 for Linux or RDP on port 3389 for Windows, both governed by the attached security group rules. Every instance can also query the Instance Metadata Service (IMDS) at the well-known address 169.254.169.254 from inside the guest OS to retrieve its own instance ID, region, IAM role credentials, and user-data script — information the operating system uses for self-configuration without needing hardcoded values. Storage is typically provided by Elastic Block Store (EBS) volumes that persist independently of the instance's compute lifecycle, attaching much like a virtual hard drive that can be detached and reattached elsewhere.

🏏

Cricket analogy: Querying instance metadata is like a batter checking the scoreboard and required run rate mid-innings — the instance looks up its own context, such as region and role, to decide how to play the situation without needing someone to shout instructions from the boundary.

Always use Instance Metadata Service Version 2 (IMDSv2), which requires a session token obtained via a PUT request before any metadata GET call. IMDSv1's simple GET-based access is a known SSRF (server-side request forgery) risk, and AWS now lets you enforce IMDSv2-only mode per instance.

Instance Lifecycle: Stop, Start, and Terminate

EC2 instances move through distinct states — pending, running, stopping, stopped, shutting-down, and terminated — and understanding the difference between stopping and terminating is essential for both cost control and data safety. Stopping an EBS-backed instance halts compute billing while preserving the root volume, so you can start it again later with the same data intact, though the public IP address usually changes unless an Elastic IP is attached. Terminating an instance is permanent: by default the root EBS volume is deleted along with it unless you explicitly set DeleteOnTermination to false, and any data on an instance store (ephemeral) volume is lost the moment the underlying host reassigns that physical disk space.

🏏

Cricket analogy: Stopping an instance is like a team going into a rain delay — play pauses, the scoreboard and team sheet are preserved exactly as they were, and the match resumes later from that same state rather than restarting from ball one.

Instance store volumes are physically attached to the host and are ephemeral: data is lost on stop, terminate, or underlying hardware failure — never store anything you can't afford to lose on instance store without a replication or backup strategy. EBS-backed root volumes survive a stop/start cycle but are still deleted on termination unless DeleteOnTermination is explicitly disabled.

  • EC2 instances are virtual servers billed by the second, launched from AMI templates and defined by an instance type, key pair, and security group.
  • Custom AMIs let you snapshot a configured instance so future launches start from a standardized, ready-to-run image.
  • Security groups act as stateful virtual firewalls controlling which ports and sources can reach an instance.
  • The Instance Metadata Service lets an instance query its own identity and temporary IAM credentials; always require IMDSv2 for security.
  • Stopping an EBS-backed instance halts billing while preserving the root volume; terminating deletes the instance and, by default, its root volume.
  • Instance store (ephemeral) volumes lose all data on stop or terminate, unlike EBS volumes which persist independently of instance lifecycle.
  • Elastic IPs prevent the public IP address from changing across stop/start cycles, which matters for DNS-dependent workloads.

Practice what you learned

Was this page helpful?

Topics covered

#AWS#AWSFundamentalsStudyNotes#CloudComputing#EC2Fundamentals#EC2#Fundamentals#Amazon#AMIs#StudyNotes#SkillVeris

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse