← Back to list

Servise Models, EC2, EBS, EFS

What are the service models, EC2, AZ, EBS, EFS

Chetanamali · 2026-01-02 02:32 · 0 claps · 4.5 min read
#ec2 #be #ef
Open on Medium ↗

Servise Models, EC2, EBS, EFS

Service models

In cloud Computing, service models means how much the cloud provide manages for you vs how much you manage yourself.

there are3 main types:

1️⃣ IaaS — Infrastucture as a Service

You rent virtual hardware

You get:

  • Virtual machines (servers), Storage, Networking

You manage:

  • OS (Linux/Windows), Runtime, Applications, Data

Provider manages:

  • Physical servers, Data center, Networking hardware

Examples:

  • AWS EC2, Azure Virtual Machines, Google Compute Engine

Use when: You want full control and flexibility (common for backend devs & DevOps).

2️⃣ PaaS — Platform as a Service

👉 You focus only on building apps

You get:

  • OS, Runtime, Middleware, Auto-scaling

You manage:

  • Application code, Data

Provider manages:

  • Infrastructure, OS, Updates & patches

Examples:

  • AWS Elastic Beanstalk, Google App Engine, Azure App Service

Use when: You don’t want to manage servers — just deploy code fast.

3️⃣ SaaS — Software as a Service

👉 You just use the software

You manage:

  • Nothing 😄

Provider manages:

  • Everything (infra, updates, security)

Examples:

  • Gmail, Google Drive, Zoom, Dropbox

Use when: You only want the final product, not development.

🧠 Easy way to remember

🍕 Pizza analogy

  • IaaS → You cook at home (raw ingredients)
  • PaaS → Ready-to-cook meal
  • SaaS → Order pizza, just eat

Regions and Availability zones:

Region: A geographical are, means a physical location in the world where aws has its data centers.

🌍 Region

A Region is a geographical location where a cloud provider has data centers.

Examples (AWS):

  • Asia Pacific (Mumbai) → ap-south-1
  • US East (N. Virginia) → us-east-1
  • Europe (Frankfurt) → eu-central-1

Key points:

  • Each region is independent
  • Data is not shared automatically between regions
  • You choose region based on: Lowest latency, Legal/data compliance, Cost, Disaster recovery

🏢 Availability Zone (AZ)

An Availability Zone is a physically separate data center inside a region.

Example (Mumbai region):

  • ap-south-1a ,ap-south-1b , ap-south-1c

Each AZ has:

  • Separate power, Separate cooling, Separate networking

But they are connected with high-speed, low-latency links.

☁️ What is EC2?

EC2 = Elastic Compute Cloud

It is a service that lets you rent virtual computers (servers) in the cloud.

Instead of buying a physical server, you:

  • Launch an EC2 instance
  • Choose CPU, RAM, storage, OS
  • Pay only for the time you use

We can run the websites, Game servers, APIs, Databases, and any applications that needs a computer. So basically EC2 is a Cloud Computers

⚙️ What you choose when creating EC2

Instance type → CPU & RAM (t2.micro, t3.medium, etc.)

Operating System → Linux / Windows

Region & AZ, Storage (EBS), Security Group (firewall rules), Key pair (for SSH login)

How you access EC2

  • Linux → SSH
  • Windows → RDP

💰 Pricing models

  • On-Demand → pay per hour/second
  • Reserved → cheaper for long-term
  • Spot → very cheap, but can stop anytime

What is AMI

AMI is a Amazon Machine Image. its a Template(Blueprint) for a Virtual server (EC2 Instance).

It includes:

  • Operating system (Amazon Linux, Ubuntu, Windows, etc.)
  • Pre-installed software (web servers, databases, apps, libraries)
  • Application code
  • Configuration settings
  • Root volume snapshot (EBS-backed)

Why AMIs are important

  • 🚀 Fast launches — spin up EC2 instances in minutes
  • 🔁 Consistency — every instance created from the same AMI is identical
  • 📈 Scalability — perfect for Auto Scaling Groups
  • 🛠️ Customization — build your own AMI with exactly what you need

Types of AMIs

  1. AWS-provided AMIs — maintained by Amazon (safe default)
  2. Marketplace AMIs — preconfigured by third-party vendors
  3. Community AMIs — shared by other users (use with caution)
  4. Custom AMIs — created by you from an existing EC2 instance

Instance Type

An EC2 instance type defines how powerful your virtual machine is in AWS.

What an EC2 instance type decides

An instance type determines:

  • vCPU count (processing power)
  • Memory (RAM)
  • Storage type (EBS-only or instance store)
  • Network performance
  • GPU / accelerator (if any)

Example:

*t3.micro → 2 vCPU, 1 GB RAM (great for small apps)*

Instance type naming (easy to decode)

Example: **m5.large**

  • m → instance family (general purpose)
  • 5 → generation (newer = better)
  • large → size (more CPU/RAM than medium)

Major EC2 instance families

🧩 General Purpose

Balanced CPU + memory

  • t3, t4g, m5, m6
  • Use case: web servers, APIs, small databases

⚡ Compute Optimized

More CPU power

  • c5, c6
  • Use case: game servers, batch processing, high-performance apps

🧠 Memory Optimized

More RAM

  • r5, r6, x2
  • Use case: in-memory databases, analytics

💾 Storage Optimized

Fast local storage

  • i3, i4, d2
  • Use case: data warehousing, big data

🎮 Accelerated Computing

GPU / ML / AI

  • p4, g5, inf1
  • Use case: machine learning, rendering, simulations

Security Groups

Security Groups in AWS are virtual firewalls that control inbound and outbound traffic for EC2 instances.

Inbound and Outbound describe the direction of network traffic.

  • Inbound traffic → Data coming into your EC2 instance 👉 Example: A user accessing your website on port 80
  • Outbound traffic → Data going out from your EC2 instance 👉 Example: Your server sending a response or calling an API

In short:

  • Inbound = who can access your server
  • Outbound = where your server can send data 🌐

EBS (Elastic Block Store)

EBS is persistent storage that acts as a hard drive for EC2 instances

Provides persistent block-level storage for EC2 instances.Works like a virtual hard disk. Data persists even after EC2 is stopped or restarted.Each EBS volume is attached to one EC2 instance (in the same AZ). we can increase the size without stoping the instance. 2 EC2 instance cannot connect to single EBS one EBS volume an be connect to one EC2 a a time.

Use to store:

OS, Applications, Files, Database

Common EBS volume types

  • gp3 / gp2 — General purpose (most used)
  • io1 / io2 — High performance (databases)
  • st1 — Throughput optimized
  • sc1 — Cold storage (low cost)

Why we need EBS

Persistance, High Durability, High performance, EBS provide snapeshot that store in S3, and EBS is a elastice so we can increse the EBS storage but we cannot decrease it directly.

data store in memory randomly

data store in memory randomly

EFS (Elastic File System)

Provides scalable, shared file storage for multiple EC2 instances

  • Works like a network drive that can be mounted on many servers at once
  • Automatically grows and shrinks as you add/remove files
  • File-level storage (vs EBS which is block-level)
  • Highly available and durable across multiple AZs
  • Can be accessed concurrently by multiple EC2 instances

Why we need EFS

  • Web Hosting, Microservices, Developer environment

On which protocol ES works?

  • NFS(Network file system): let you share the folder across machine over a network.


메타데이터
post_id
aa19bb6ff804
slug
servise-models-ec2-ebs-efs-aa19bb6ff804
url
https://medium.com/@chetanamali9763/servise-models-ec2-ebs-efs-aa19bb6ff804
canonical_url
https://medium.com/@chetanamali9763/servise-models-ec2-ebs-efs-aa19bb6ff804
author_url
https://medium.com/@chetanamali9763
status
ok
fetched_at
2026-06-12 22:02:08