Cloud Fundamentals
Cloud computing essentials — IaaS, PaaS, SaaS and serverless, regions and availability zones, the core services (compute, storage, databases, networking) across AWS, GCP and Azure, VPCs, IAM, the shared responsibility model, high availability, and cost management.
Cloud computing means renting computing resources — servers, storage, databases, networks — on demand over the internet, paying for what you use, instead of buying and running hardware. It turns capital expense into operating expense and lets you scale in minutes.
Service models
| Model | You manage | Provider manages | Examples |
|---|---|---|---|
| On-premises | Everything | Nothing | Your own data centre |
| IaaS — infrastructure | OS, runtime, app, data | Hardware, virtualisation, network | EC2, Compute Engine, Azure VMs |
| CaaS — containers | Containers, app, data | + OS, orchestration | EKS/GKE/AKS, ECS, Cloud Run |
| PaaS — platform | App code and data | + OS, runtime, scaling | Heroku, App Engine, Elastic Beanstalk, Render |
| FaaS — serverless functions | Functions | + servers, scaling to zero | Lambda, Cloud Functions, Workers (Serverless) |
| SaaS — software | Your data and settings | The whole application | Gmail, Salesforce, Slack |
Moving down the table: less control, less operational work.
Global infrastructure
- Region: a geographic area (
ap-south-1Mumbai,us-east-1N. Virginia) — choose for latency to users, data residency laws, price and service availability. - Availability Zone (AZ): one or more isolated data centres within a region, with independent power and networking, connected by low-latency links. Deploy across multiple AZs to survive a data-centre failure.
- Edge locations / PoPs: hundreds of sites for CDN caching and DNS (CloudFront, Cloud CDN, Cloudflare).
Core services across providers
| Category | AWS | Google Cloud | Azure |
|---|---|---|---|
| Virtual machines | EC2 | Compute Engine | Virtual Machines |
| Managed Kubernetes | EKS | GKE | AKS |
| Serverless containers | Fargate, App Runner | Cloud Run | Container Apps |
| Functions | Lambda | Cloud Run functions | Azure Functions |
| Object storage | S3 | Cloud Storage | Blob Storage |
| Block storage | EBS | Persistent Disk | Managed Disks |
| Managed SQL | RDS, Aurora | Cloud SQL, AlloyDB, Spanner | Azure SQL, Database for PostgreSQL |
| NoSQL | DynamoDB | Firestore, Bigtable | Cosmos DB |
| Cache | ElastiCache | Memorystore | Azure Cache for Redis |
| Queues / streams | SQS, SNS, Kinesis | Pub/Sub | Service Bus, Event Hubs |
| Data warehouse | Redshift | BigQuery | Synapse / Fabric |
| CDN | CloudFront | Cloud CDN | Front Door |
| DNS | Route 53 | Cloud DNS | Azure DNS |
| Identity | IAM | IAM | Entra ID + RBAC |
| Monitoring | CloudWatch | Cloud Monitoring/Logging | Azure Monitor |
Storage types
| Type | Access | Use |
|---|---|---|
| Object (S3) | HTTP API, whole objects by key; virtually unlimited; 11 nines durability | Media, backups, static sites, data lakes, logs |
| Block (EBS) | Attached to one VM as a disk | Databases, OS volumes |
| File (EFS, Filestore) | Shared NFS/SMB filesystem | Shared content between many servers |
Object storage has storage classes (standard → infrequent access → archive/Glacier) with lifecycle rules to move data to cheaper tiers.
Networking: the VPC
A Virtual Private Cloud is your isolated network inside the provider (IP addressing):
- Subnets split the VPC's CIDR range per AZ. Public subnets route to an internet gateway; private subnets don't — app servers and databases live there, reaching the internet (for updates) only outbound through a NAT gateway.
- Security groups: stateful firewalls per instance ("allow 5432 only from the app servers' security group").
- Network ACLs: stateless subnet-level rules.
- Connect to on-premises or other VPCs with VPN, Direct Connect/Interconnect, peering or transit gateways; reach provider services privately with VPC endpoints / Private Link.
Identity and access management
IAM controls who can do what to which resources. The most important security boundary in the cloud.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::invoices-prod/*"
}]
}- Least privilege: grant only the actions and resources needed.
- Give workloads roles (temporary credentials, automatically rotated) — never long-lived access keys in code. CI systems should use OIDC federation to assume roles.
- Humans log in through SSO with MFA; lock away the root account.
- Separate environments (dev, staging, prod) into separate accounts/projects.
The shared responsibility model
| Provider is responsible for security of the cloud | You are responsible for security in the cloud |
|---|---|
| Physical data centres, hardware, hypervisor, global network | IAM policies, data encryption choices, network configuration |
| Managed service internals (patching RDS's OS) | OS patching on your VMs, application code, secrets |
Most cloud breaches are customer misconfigurations: public S3 buckets, over-broad IAM policies, leaked access keys, open security groups.
Designing for availability
- Run stateless app tiers across ≥ 2 AZs behind a load balancer, with auto-scaling groups.
- Use managed databases with multi-AZ standbys and automated backups; test restores.
- For regional disasters: cross-region replication, backups and a documented failover (RTO/RPO targets — Reliability patterns).
- Avoid single points of failure: one NAT gateway, one AZ, a single instance.
Cost management
Cloud bills surprise teams that don't watch them.
| Lever | Detail |
|---|---|
| Right-size | Most instances are over-provisioned; check utilisation |
| Pricing models | On-demand → reserved instances / savings plans (up to ~70% off for 1–3 year commitments) → spot/preemptible (up to ~90% off, can be reclaimed — for batch and stateless workers) |
| Turn things off | Dev environments at night; delete unattached disks, old snapshots, idle load balancers |
| Storage tiers | Lifecycle policies to cheaper classes |
| Data transfer | Egress to the internet and cross-AZ/region traffic is billed — often the hidden cost |
| Visibility | Tags per team/service, budgets and alerts, cost dashboards (FinOps) |
- IaaS → PaaS → FaaS → SaaS: progressively less control and less operational work.
- Regions for latency and compliance; multiple AZs for fault tolerance; edge locations for CDN.
- Know the core services: compute, object/block/file storage, managed databases, queues, CDN, DNS, IAM.
- VPCs: public subnets for load balancers, private subnets for apps and data, NAT for outbound, security groups as firewalls.
- IAM least privilege with roles, not long-lived keys; most breaches are customer misconfigurations.
- Spread across AZs, back up and test restores; manage cost with right-sizing, commitments, spot and egress awareness.