AWS EC2: Instance Storage

Once an EC2 instance is running, it needs somewhere to put data. AWS gives you three kinds of disk to attach to a VM, and each one behaves very differently. The options Type Storage Lifecycle Scope EBS Block, network-attached Persistent One AZ Instance Store Block, physically on the host Ephemeral — lost on stop/terminate One host EFS File (NFS), network share Persistent Multi-AZ Mental model EC2 ──attaches──> EBS volume (its own dedicated disk, persistent) EC2 ──has──────> Instance Store (host's physical NVMe, ephemeral) EC2 ──mounts───> EFS (network file share, many EC2s share it) In plain terms:...

May 16, 2026 · 4 min · Daman Arora

AWS EC2: Elastic Compute Cloud

EC2 is the compute layer of AWS — rentable virtual machines. When you need a server to run an application, EC2 is where it lives. The core pieces Launching an EC2 instance means assembling a handful of parts. Each one answers a specific question. Piece What it is Instance A running VM AMI The image/template the VM boots from — OS plus pre-installed software Instance Type Sizing — CPU, RAM, network (e....

May 16, 2026 · 4 min · Daman Arora

AWS IAM: Identity & Access Management

IAM is the part of AWS that controls who can do what. Every API call, every console click, and every request a service makes is checked against IAM before it is allowed to proceed. The 4 building blocks IAM is built from four pieces. Understanding what each one is for makes the rest of the service easy to reason about. Block What it is Used for User Long-lived credentials Humans Group A bundle of users Sharing permissions Role A temporary, assumed identity Services, federated users, cross-account access Policy JSON rules Attached to a user, group, role, or resource Mental model Principal (user/role) ──has──> Policy ──grants──> Permissions on resources It helps to keep these one-line definitions in mind:...

May 16, 2026 · 4 min · Daman Arora

Logical grammar used in linux vi editor

Vi Command Patterns Vi has a logical grammar once you see it. Let me break down the patterns: The Core Grammar: Operator + Motion Most vi commands follow this structure: [count] + operator + motion Operators (what to do): d = delete c = change (delete + enter insert mode) y = yank (copy) Motions (where/how far): w = word forward b = word backward $ = end of line 0 = beginning of line G = end of file gg = beginning of file Combine them:...

December 11, 2025 · 2 min · Daman Arora

CloudStack VM Deployment - Complete Flow

Understanding the sync and async phases of VM deployment. SYNC PHASE (~250ms) Client blocks here. Must complete before job ID is returned. ┌─────────────────────────────────────────────────────────────────────────┐ │ SYNC PHASE (37.044 - 37.296) ~250ms │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ HTTP POST /deployVirtualMachine │ │ │ │ │ ▼ │ │ ┌─────────────────┐ │ │ │ Authentication │ 2FA check, CIDR validation │ │ │ Authorization │ Role check, resource permissions │ │ └────────┬────────┘ │ │ ▼ │ │ ┌─────────────────┐ │ │ │ DB Allocation │ vm_instance (Stopped), nics, volumes (Allocated) │ │ │ │ resource_count incremented │ │ └────────┬────────┘ │ │ ▼ │ │ ┌─────────────────┐ │ │ │ Submit Job │ AsyncJobManager creates job-43 │ │ └────────┬────────┘ │ │ ▼ │ │ Return: { jobid: "5dc96a21-....

November 29, 2025 · 9 min · Daman Arora