Cloud and infrastructure as code
Cloud primitives on AWS and GCP
Regions, zones, compute, storage, managed databases and messaging, how the services map between AWS and GCP, and how to decide what to run yourself.
A cloud provider sells a few dozen kinds of building block: virtual machines, disks, object buckets, managed databases and queues. AWS has more than 200 services and GCP well over 100. Most production systems are built from about fifteen of them. Learn those well, and you can read most architecture diagrams, estimate their cost and spot where they will fail.
The page starts with the physical layout, regions and zones, because almost every reliability decision depends on it. Then it covers compute, storage and managed services. Each section shows the AWS and GCP names side by side.
The concept pages
| Step | Concept | What it answers |
|---|---|---|
| 1 | Regions and availability zones | What survives when a zone or region fails? |
| 2 | VMs, spot and autoscaling | How do you size, buy and scale virtual machines? |
| 3 | Storage types | Block, object or file: which one fits the data? |
| 4 | Managed databases and messaging | Which managed service matches the access pattern? |
| 5 | Managed vs self-hosted | When is running it yourself worth the cost? |
AWS and GCP side by side
Most concepts translate one to one. The differences are in the details. GCP VPCs are global, while AWS VPCs are regional. GCP projects are the billing and IAM boundary, where AWS uses accounts.
| Category | AWS | GCP |
|---|---|---|
| VMs | EC2 | Compute Engine |
| Kubernetes | EKS | GKE |
| Containers, serverless | ECS/Fargate, App Runner | Cloud Run |
| Functions | Lambda | Cloud Run functions |
| Block storage | EBS | Persistent Disk / Hyperdisk |
| Object storage | S3 | Cloud Storage |
| Relational | RDS, Aurora | Cloud SQL, AlloyDB, Spanner |
| Cache | ElastiCache | Memorystore |
| Queue and pub/sub | SQS, SNS, EventBridge | Pub/Sub, Cloud Tasks, Eventarc |
| Warehouse | Redshift | BigQuery |
A review checklist: the Well-Architected pillars
AWS's Well-Architected Framework groups good practice into six pillars. Use them as questions when you review a design doc.
| Pillar | Question to ask |
|---|---|
| Operational excellence | Is everything in code, and is there a runbook? |
| Security | Is IAM least-privilege, and is nothing public by accident? |
| Reliability | Does it span AZs with spare capacity, and have backups been restored? |
| Performance efficiency | Is the instance family right, and was it load-tested? |
| Cost optimisation | Is it rightsized, and are cross-AZ and egress charges understood? |
| Sustainability | Are idle resources shut down? |
A design that answers each row in a sentence is in good shape. If it cannot answer the reliability row ("what happens if one zone goes away?"), it is not ready.
Common mistakes
- Assuming a managed service removes the work. You still own the schema, the access patterns and the bill.
- Picking a service by its name. Pick it by how it fails, and what it costs at your traffic.
- Ignoring data transfer. Cross-AZ and egress traffic are charged, and they grow with chatty services.
Key takeaways
- Regions isolate failures. Zones are close enough to replicate across synchronously, so design every tier to lose one.
- Default to managed databases, caches and queues. Count engineer time as well as the bill.
- Learn the concepts first, then the names. AWS and GCP map almost one to one.
Further learning
Fireship's ten-minute tour is a fast way to put names to the long tail of AWS services, so you can recognise them in diagrams.
Next, see how zones and regions shape a design in regions and availability zones.
Related
Cloud networking and VPCs
VPCs, subnets, routing, NAT, security groups and private connectivity in AWS and GCP, plus a three-AZ reference architecture and how to debug when A cannot reach B.
Databases and data modeling
Choose between relational, document, wide-column, key-value, graph and analytical stores by listing your access patterns first, then model the data to fit them.
Cloud cost and FinOps
Where cloud money goes, the levers that usually cut a bill, and how engineers own unit cost without waiting for a finance spreadsheet. Start here for the map of cost pages.