Cloud Quick Reference

Cloud Computing, AWS & Azure CLI Cheat Sheet

Your desk-side reference for cloud fundamentals, cross-provider service mapping, everyday AWS & Azure CLI commands, SLA math, and billing traps to avoid.

โฑ๏ธ 8 min scan๐ŸŸข Beginner Friendly๐Ÿ“… Updated: 2026

Anatomy of a Cloud CLI Command

Cloud CLIs read like a predictable sentence: Tool + Service + Action + Target + Flags. Once you see this pattern, you can guess almost any command.

aws s3 ls s3://my-bucket --region us-east-1
Tool aws CLI program (az for Azure)
Service s3 Which cloud product
Action ls What to do (list)
Target s3://my-bucket Resource path / ID
Flag --region us-east-1 Optional modifier
๐Ÿ“ Shared Responsibility Model: Who Manages What?
On-Premises IaaS (EC2 / Azure VM) PaaS (App Service / RDS) SaaS (M365 / Gmail) Data & Access Applications Runtime / OS Virtualization Servers & Storage Networking / DC You Manage Cloud Provider Manages Data & IAM Applications OS & Patching Hypervisor Hardware Physical DC Data & IAM Applications OS & Patching Hypervisor Hardware Physical DC Data & IAM Your Code / App OS & Runtime Hypervisor Hardware Physical DC Data & Users Application OS & Runtime Hypervisor Hardware Physical DC

1 AWS vs Azure vs GCP Core Services

The big three clouds offer the same core building blocks under different brand names. Use this translator whenever you switch platforms.

Category What It Does AWS Microsoft Azure Google Cloud (GCP)
Compute (VMs) Rent virtual servers with CPU & RAM EC2 (Elastic Compute Cloud) Azure Virtual Machines Compute Engine
Object Storage Store unlimited files, backups, images Amazon S3 Azure Blob Storage Cloud Storage
Block Storage Virtual hard drives attached to VMs EBS (Elastic Block Store) Azure Managed Disks Persistent Disk
Relational DB Managed SQL (PostgreSQL, MySQL) Amazon RDS / Aurora Azure SQL / Flexible Server Cloud SQL / Spanner
Networking / VPC Private isolated cloud network & subnets Amazon VPC Azure Virtual Network (VNet) VPC Network
IAM / Identity Users, roles, permissions & SSO AWS IAM Microsoft Entra ID + RBAC Cloud IAM
Serverless Run code on events without managing servers AWS Lambda Azure Functions Cloud Run Functions
Kubernetes Managed container orchestration Amazon EKS Azure Kubernetes Service (AKS) Google Kubernetes Engine (GKE)

2 Essential AWS CLI Commands

The AWS CLI v2 uses aws <service> <operation>. Add --output table or --dryrun whenever you want human-readable output or a safe test run.

aws configure
Initial Setup & Credentials
Prompts for Access Key ID, Secret Key, default region (e.g. us-east-1), and output format (json).
aws sts get-caller-identity
"Who Am I?" Check
Safely verifies which AWS Account ID, IAM User, or Role your terminal is currently authenticated as.
aws ec2 describe-instances --query "Reservations[*].Instances[*].[InstanceId,State.Name,PublicIpAddress]" --output table
List EC2 Virtual Machines
Prints a clean table of every EC2 Instance ID, running/stopped state, and public IP instead of a giant JSON wall.
aws s3 ls s3://my-bucket
List S3 Buckets or Files
Run aws s3 ls alone to list all buckets, or pass a bucket path to inspect its objects.
aws s3 cp ./backup.zip s3://my-bucket/
Upload / Download a Single File
Works like Linux cp: swap source and destination to download from S3 back to your laptop.
aws s3 sync ./dist s3://my-bucket --delete
Sync a Folder (Smart Mirror)
Uploads only new/changed files. --delete removes extra files in S3โ€”test with --dryrun first!
aws iam list-users --output table
List IAM Users
Audits all IAM user accounts in your AWS organization.
๐Ÿง  Memory Trick: AWS Output Formats

Add --output table when reading on screen, --output json when piping to jq, and --profile prod when switching between dev and prod accounts.

3 Essential Azure CLI Commands

The Azure CLI uses az <service> <action>. Almost every Azure resource must live inside a Resource Group (-g or --resource-group).

az login
Sign In to Azure
Opens your browser for MFA login. On a headless SSH server, use az login --use-device-code.
az account show --output table
Check Active Subscription
Shows which Azure Subscription & Tenant you are billing against. Use az account set --subscription "Name" to switch.
az group create --name my-rg --location eastus
Create a Resource Group
Creates a logical container (my-rg) in a region. Deleting the group deletes everything inside it cleanly.
az vm list -d --output table
List Virtual Machines + Power State
-d (show details) includes public/private IPs and whether each VM is running or deallocated.
az storage blob list --account-name mystorage --container-name mycontainer --output table
List Files in Blob Storage
Lists all blobs (files) inside an Azure Storage Container. Add --auth-mode login to use your Entra ID permissions.
az aks get-credentials --resource-group my-rg --name my-aks
Connect kubectl to AKS
Downloads cluster credentials into ~/.kube/config so you can immediately run kubectl get nodes.
๐Ÿง  Memory Trick: Azure's "Folder" Rule

Think of an Azure Resource Group as a project folder. Put all lab VMs, disks, and IPs in one groupโ€”when you finish practicing, run az group delete -n my-rg to wipe everything and guarantee zero leftover charges.

4 Cloud Pricing, SLA & Scaling Quick Reference

Interviews and architecture reviews love SLA "nines" math and cost-optimization models. Keep these numbers handy.

SLA Availability ("The Nines")

SLA Target Allowed Downtime / Year Allowed Downtime / Month Typical Use Case
99% (Two Nines) 3 days, 15 hours 7.3 hours Internal dev/test tools
99.9% (Three Nines) 8 hours, 45 minutes 43.8 minutes Single-region web apps
99.95% 4 hours, 22 minutes 21.9 minutes Standard Azure VM / Managed DB
99.99% (Four Nines) 52 minutes, 36 seconds 4.38 minutes Multi-AZ production services
99.999% (Five Nines) 5 minutes, 15 seconds 26.3 seconds Global banking, DNS (Route 53 = 100%)

Pricing Models & Scaling Concepts

๐Ÿ’ณ On-Demand

Pay per second/hour with zero commitment. Highest unit price, maximum flexibility. Best for spiky or unpredictable workloads.

๐Ÿ“… Reserved / Savings Plans

Commit for 1 or 3 years to save up to 40โ€“72%. Best for steady-state databases and 24/7 production servers.

โšก Spot / Preemptible

Rent spare cloud capacity at up to 70โ€“90% off, but the provider can reclaim it with 30sโ€“2m notice. Great for batch jobs & CI.

๐Ÿ“Š CapEx vs OpEx

CapEx = buying physical servers upfront. OpEx = paying monthly cloud bills as you consume resources.

โฌ†๏ธ Vertical (Scale Up)

Give one server more CPU/RAM (e.g. t3.micro โ†’ t3.xlarge). Simple, but hits a hardware ceiling & requires reboot.

โžก๏ธ Horizontal (Scale Out)

Add more identical servers behind a Load Balancer. Virtually unlimited scale & high availability.

5 Danger Zone: Costly Cloud Mistakes

โš ๏ธ Security & Billing Traps
1. Hardcoding IAM Keys in Git

Never commit AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, or .env files to GitHub. Automated bots scan public repos in seconds and can spin up thousands of dollars in GPU instances. Use IAM Roles, Managed Identities, or local profiles (~/.aws/credentials).

2. Leaving S3 Buckets or Blob Containers Public

Keep Block Public Access enabled at the account and bucket level. Never pass --acl public-read unless you are intentionally serving public static assetsโ€”and even then, prefer CloudFront/CDN with private origin access.

3. Confusing stop-instances vs terminate-instances

Running aws ec2 stop-instances (or stopping an Azure VM from inside the OS without az vm deallocate) stops compute billing, but you still pay for attached EBS disks & reserved Public IPs. Use aws ec2 terminate-instances when you are truly done.

4. Running aws s3 sync --delete Without --dryrun

The --delete flag deletes anything in the destination that isn't in your source folder. Always preview with --dryrun first so you don't wipe production data.