Skip to content

AWS Essentials

AWS is a collection of primitives, not a product. Interviews rarely ask you to memorise the console; they ask you to choose the right primitive, explain how the pieces connect, and say what it costs.

AWS organises infrastructure into regions (geographic areas) and availability zones (isolated data centres inside a region). You compose services inside a VPC with public and private subnets, grant access with IAM roles rather than long-lived keys, and pick a compute model per workload: EC2 for full control, Lambda for event-driven short work, containers on ECS or EKS in between. State lives in S3, RDS or a managed queue. You front it with CloudFront and Route 53, and you watch cost because egress, idle capacity and managed-service markups dominate the bill.

A region is a named geographic cluster (eu-west-1). Inside it are availability zones — physically separate data centres with independent power and networking. Multi-AZ survives losing one data centre; multi-region survives losing a region and roughly doubles cost.

  • Use at least two AZs for anything that matters; RDS Multi-AZ and a multi-subnet ALB do it for you.
  • Pick a region near users and allowed by data-residency rules — often a hard constraint.

IAM answers one question: may this principal perform this action on this resource? A user is a long-lived identity, usually human; a role is assumed temporarily; a policy is JSON with Effect, Action, Resource, Condition; a role’s trust policy says who may assume it.

Services assume a role, receive short-lived credentials from STS, and get only what they need — no access keys in environment variables, none in git. A minimal policy grants one action on one ARN:

{"Effect": "Allow", "Action": ["s3:GetObject"],
"Resource": "arn:aws:s3:::reports-prod/2026/*"}

A VPC is your private network, defined by a CIDR such as 10.0.0.0/16.

  • Subnets each belong to one AZ: public ones route to an internet gateway, private ones egress through a NAT gateway.
  • Route tables decide where traffic goes; most “why can’t it connect?” bugs are a missing route.
  • Security groups are stateful and attach to resources; network ACLs are stateless and attach to subnets. Default to security groups.
  • VPC endpoints reach S3, DynamoDB and others without NAT — cheaper, and never public.

EC2 is a virtual machine. Choose a family by shape — general purpose, compute, memory, storage, accelerated (GPU) — then a size within it.

  • Pricing: on-demand (flexible, expensive), reserved/savings plans (commitment discount on steady load), spot (cheap, reclaimable at short notice — for interruption-tolerant work only).
  • EBS is network block storage: gp3 general purpose, io2 high IOPS, st1/sc1 throughput-heavy.
  • AMI is the machine image; bake dependencies in rather than installing at boot.

Object storage with eleven nines of durability in the standard class. Buckets are globally unique; keys are flat even though the console draws folders.

  • Classes: Standard, Standard-IA, One Zone-IA, Glacier Instant Retrieval, Glacier Flexible, Glacier Deep Archive. Cheaper storage means slower or costlier retrieval.
  • Lifecycle rules move objects between classes and expire them — the cheapest cost win there is.
  • Versioning protects against overwrite and delete; pair it with lifecycle rules or the bill grows silently.
  • Presigned URLs grant temporary access to one object without exposing credentials.
  • Strong read-after-write consistency is the default since late 2020; the old LIST caveat is gone.

RDS is a managed engine (PostgreSQL, MySQL, MariaDB, SQL Server, Oracle); Aurora is AWS’s compatible reimplementation, with storage replicated across three AZs.

Feature What it does Failover
Multi-AZ Synchronous standby in another AZ Automatic, ~1–2 minutes
Read replica Asynchronous copies for read scaling Manual promotion

Multi-AZ is for availability, not performance — the standby serves no reads. Read replicas scale reads and lag. Say this clearly; it is a common screening question. Also mention point-in-time recovery and connection pooling (RDS Proxy) for serverless clients.

  • SQS is a queue: one consumer group, at-least-once delivery. Standard is high-throughput with best-effort ordering; FIFO is ordered and deduplicated per message group, at lower throughput. Know visibility timeout, long polling and the dead-letter queue.
  • SNS is pub/sub: one message fans out to many subscribers (SQS, Lambda, HTTP, email).
  • Fan-out — SNS to several SQS queues — is the standard answer for “many services need the same event without coupling”.

CloudFront is the CDN: caches at edge locations, terminates TLS, supports signed URLs and origin access control so the bucket stays private. Route 53 is DNS with health checks: know A/AAAA, CNAME, and Alias (works at the zone apex), plus the simple, weighted, latency, failover, geolocation and multivalue routing policies.

  • Egress is not free — including much cross-AZ traffic. Cache and compress.
  • NAT gateways bill per hour and per GB; high-volume private traffic through NAT is a classic surprise. Use VPC endpoints.
  • Idle capacity is the biggest waste. Right-size, autoscale, stop non-prod at night.
  1. How would you give a Lambda permission to read one S3 prefix, and why not an IAM user?
  2. Security group versus NACL — why does statefulness matter?
  3. Multi-AZ versus read replica: which fixes a read-heavy workload?
  4. When would you choose SQS over SNS, and when both?
  • Saying “IAM user” for a service. Workloads assume roles.
  • Claiming Multi-AZ improves read throughput. The standby is idle.
  • Assuming S3 is a filesystem. No rename, no partial writes, no locking.
  • Forgetting egress in cost estimates. Usually the second-largest line item.
  • Making everything public “for simplicity”. Reads as not knowing what private subnets are for.