PrepStack › DevOps & Cloud › AWS Core Services
AWS Core Services interview cheat sheet
IAM, EC2, VPC, S3, databases, serverless, messaging, HA/DR and design
AWS interviews test whether you can pick the right service and explain the trade-off: IAM and how a request is allowed or denied, EC2 vs Lambda vs containers, VPC networking, S3 storage classes, RDS vs Aurora vs DynamoDB, SQS vs SNS vs EventBridge vs Kinesis, and how you would make a system highly available and cheap. Senior rounds end with a design question. Read the 15-minute revision first, then use Quiz mode and answer out loud, naming services and the reason for each choice.
15-minute revision
- Shared responsibility: AWS secures *the cloud* (hardware, facilities, hypervisor, managed-service internals). You secure what you put *in* it (data, IAM, OS patches on EC2, security groups, encryption choices).
- Region = separate geographic area with multiple AZs (one or more isolated data centres each, low-latency links). Spread across ≥2 AZs for HA; use multiple Regions for DR or latency.
- IAM evaluation: explicit Deny always wins, then an Allow is needed (no Allow = implicit deny). SCPs and permissions boundaries only limit; they never grant.
- Prefer roles (temporary STS credentials) over IAM users with access keys. Humans sign in through IAM Identity Center; workloads use instance profiles, task roles or Lambda execution roles.
- Security group = stateful, allow-only, attached to an ENI. NACL = stateless, allow + deny, numbered rules, attached to a subnet; remember ephemeral return ports.
- Public subnet = its route table sends
0.0.0.0/0to an Internet Gateway. Private subnets reach out via a NAT gateway (one per AZ for HA). AWS reserves 5 IPs per subnet. - Peering is 1:1 and non-transitive. Transit Gateway is a hub for many VPCs and on-prem. Gateway endpoints (S3, DynamoDB) are free; interface endpoints (PrivateLink) cost per hour/GB.
- EC2 pricing: On-Demand (flexible) · Savings Plans / Reserved (1 or 3 years, up to ~72% off) · Spot (up to ~90% off, 2-minute interruption notice) · Dedicated Hosts (licensing/compliance).
- EBS = network block storage that persists, lives in one AZ, and is backed up with snapshots. Instance store = local disk, fastest, lost on stop/terminate.
- ALB = layer 7 (paths, hosts, headers, Lambda targets). NLB = layer 4 (TCP/UDP/TLS, static IPs, extreme throughput). GWLB = layer 3 for firewall appliances (GENEVE).
- S3: 11 nines durability, strong read-after-write consistency, SSE-S3 by default, Block Public Access on by default. Lifecycle moves objects Standard → IA → Glacier tiers.
- RDS = managed MySQL/PostgreSQL/etc. Aurora = AWS-built engine with 6 copies of storage across 3 AZs and fast failover. DynamoDB = serverless key-value with single-digit ms latency at any scale.
- Lambda: 128 MB–10,240 MB memory (CPU scales with memory), sync payload 6 MB, default 1,000 concurrent executions per Region. Cold starts: fix with provisioned concurrency or SnapStart.
- SQS = queue (one consumer group pulls). SNS = push fan-out. EventBridge = event bus with content-based routing. Kinesis = ordered, replayable stream with shards.
- Well-Architected has 6 pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, Sustainability.
- DR from cheapest/slowest to dearest/fastest: backup & restore → pilot light → warm standby → multi-site active/active. RPO = data you can lose, RTO = downtime you can accept.
Cloud & identity foundations
Cloud models, shared responsibility & global infrastructure
IaaS, PaaS and SaaS differ in how much AWS manages; Regions, AZs and edge locations decide where things run.
- IaaS gives you raw building blocks (EC2, EBS, VPC). PaaS runs your code without managing servers (Elastic Beanstalk, Lambda, RDS in a sense). SaaS is a finished product (WorkMail, QuickSight).
- Shared responsibility: the more managed the service, the more AWS owns. On EC2 you patch the OS; on RDS AWS patches the engine; on Lambda you own only code, config and IAM.
- A Region is an independent geographic area (for example
eu-west-1). Data does not leave a Region unless you move it. Pick a Region by compliance, latency, service availability and price. - An Availability Zone is one or more data centres with independent power and networking, connected to other AZs in the Region by low-latency links. HA designs span at least 2 AZs.
- Edge locations (points of presence) run CloudFront, Route 53, and Global Accelerator close to users. Local Zones and Wavelength push compute nearer to cities and 5G networks.
- Most services are regional (EC2, VPC, RDS, Lambda). A few are global (IAM, Route 53, CloudFront, Organizations).
Interview questions
- Explain the shared responsibility model.
- Difference between a Region and an Availability Zone?
- IaaS vs PaaS vs SaaS with AWS examples?
IAM: users, groups, roles, policies & MFA
IAM decides who (principal) can do what (action) on which resource, under which conditions.
- Root user: full access, cannot be limited by IAM policies. Enable MFA, delete its access keys and use it only for the few root-only tasks.
- IAM user: a long-term identity with a password and/or access keys. Avoid for humans in multi-account setups and avoid long-lived keys for apps.
- Group: a set of users that share policies. Groups cannot be nested and cannot be a principal in a policy.
- Role: an identity with no long-term credentials. Someone or something *assumes* it and receives temporary credentials from STS. Used by EC2, Lambda, ECS tasks, other accounts and federated users.
- Policy: a JSON document with
Effect,Action,Resource, optionalCondition(andPrincipalin resource policies). Types: AWS managed, customer managed, inline. - Least privilege: start with nothing and add only what is needed. Use IAM Access Analyzer to generate policies from CloudTrail activity and to find unused access.
- MFA: require it for console users and for sensitive actions with the
aws:MultiFactorAuthPresentcondition key.
Interview questions
- Difference between an IAM user, group and role?
- What is the principle of least privilege and how do you apply it on AWS?
- What should you do with the root user?
STS, AssumeRole, cross-account & IAM Identity Center
A role has a trust policy (who may assume it) and permission policies (what it may do); STS hands out temporary credentials.
- A role has two parts: the trust policy (a resource policy naming who can call
sts:AssumeRole) and permission policies (what the session can do). AssumeRolereturns an access key, secret key and session token that expire. Default session is 1 hour; a role's maximum can be set up to 12 hours. Role chaining is capped at 1 hour.- Cross-account access: account B creates a role trusting account A; a principal in A needs
sts:AssumeRoleon that role ARN. Add ansts:ExternalIdcondition for third parties (confused-deputy protection). - Federation:
AssumeRoleWithSAML(corporate IdP) andAssumeRoleWithWebIdentity(OIDC, for example GitHub Actions or EKS service accounts via IRSA). - IAM Identity Center (successor to AWS SSO) is the recommended way for people to access many accounts. You assign users/groups to accounts with permission sets, which become roles in each account.
- Workloads get roles automatically: instance profile for EC2, execution role for Lambda, task role for ECS, EKS Pod Identity or IRSA for pods.
Interview questions
- How does cross-account access work with roles?
- What is STS and why are temporary credentials better?
- What is IAM Identity Center and when would you use it over IAM users?
Identity vs resource policies & policy evaluation logic
Explicit deny beats everything; otherwise every applicable guardrail must allow and at least one grant must allow.
- Identity-based policies attach to users, groups or roles. Resource-based policies attach to a resource (S3 bucket policy, SQS queue policy, KMS key policy, Lambda resource policy, role trust policy) and name a
Principal. - Every request starts as implicit deny. Any matching explicit Deny anywhere ends evaluation with deny.
- Guardrails only cap permissions: Organizations SCPs (cap principals) and RCPs (cap resources), permissions boundaries and session policies. Each must allow the action if present.
- Same account: an allow in *either* the identity policy *or* the resource policy is enough (with some exceptions such as KMS key policies and role trust policies).
- Cross account: the identity policy in the caller's account *and* the resource policy in the owner's account must both allow.
- Conditions narrow statements:
aws:SourceIp,aws:SourceVpce,aws:PrincipalOrgID,aws:RequestedRegion,aws:PrincipalTag/aws:ResourceTag(ABAC).
Interview questions
- Walk me through how AWS decides whether a request is allowed.
- Difference between identity-based and resource-based policies?
- What is a permissions boundary and when do you use it?
- Your SCP allows everything, the role has
s3:GetObject, yet access is denied. What do you check?
KMS, Secrets Manager & Parameter Store
KMS manages encryption keys and does envelope encryption; Secrets Manager stores and rotates secrets; Parameter Store is cheap config.
- KMS keys never leave KMS unencrypted (HSM-backed). Types: AWS managed (
aws/s3, no control over policy), customer managed (your key policy, rotation, cross-account use) and AWS owned. Encryptworks directly only on up to 4 KB. For real data, KMS uses envelope encryption:GenerateDataKeyreturns a plaintext data key and the same key encrypted; you encrypt data locally and store the encrypted data key next to it.- Every key has a key policy. Access needs the key policy (and usually IAM) to allow it. Grants give temporary, programmatic permissions (used by EBS, RDS).
- Automatic rotation for customer managed symmetric keys keeps old key material, so old ciphertext still decrypts. Every KMS call is logged in CloudTrail.
- Secrets Manager: built-in rotation (Lambda-based, native for RDS/Aurora/Redshift), versioning, cross-Region replication. Charged per secret per month plus API calls.
- SSM Parameter Store: hierarchical config (
/app/prod/db_url),SecureStringencrypted with KMS. Standard tier is free; no built-in rotation.
Interview questions
- What is envelope encryption?
- Secrets Manager or Parameter Store for a database password?
- AWS managed key vs customer managed key?
Compute
EC2: instance types, AMIs, storage, user data & placement
EC2 is a virtual server: choose a family, an AMI, storage and network rules, and bootstrap it with user data.
- Instance name
m7g.large= familym, generation7, attributeg(Graviton/ARM), sizelarge. Graviton usually gives better price-performance if your software runs on ARM. - Families: T/M general purpose (T is burstable with CPU credits), C compute, R/X memory, I/D storage-optimised, P/G/Inf/Trn accelerated (GPU, inference, training).
- An AMI is a template: root volume snapshot, launch permissions and block device mapping. AMIs are regional; copy them to other Regions. Build golden AMIs with EC2 Image Builder or Packer.
- EBS volumes are network-attached, persist independently, live in one AZ, and are backed up with incremental snapshots (stored in S3, copyable across Regions).
gp3is the default SSD;io2for high IOPS. - Instance store is physically attached disk: very fast, but data is lost on stop, hibernate or terminate (it survives reboot). Use for caches, buffers, scratch.
- User data runs a script on first boot (as root, via cloud-init). Instance metadata at
169.254.169.254gives role credentials and instance info; enforce IMDSv2 (session tokens). - Placement groups: cluster (same rack area, lowest latency, HPC), spread (separate hardware, max 7 running instances per AZ per group), partition (groups of racks for Kafka, HDFS, Cassandra).
Interview questions
- Difference between EBS and instance store?
- What is user data and what is instance metadata?
- When would you use each placement group type?
Purchasing options & cost optimisation
Cover the steady baseline with commitments, burst on On-Demand, and run interruptible work on Spot.
- On-Demand: pay per second (Linux) with no commitment. Good for spiky or unknown workloads and short tests.
- Savings Plans: commit to a $/hour of spend for 1 or 3 years. Compute Savings Plans (up to ~66% off) apply across instance family, Region, Fargate and Lambda; EC2 Instance Savings Plans (up to ~72%) are tied to a family in a Region.
- Reserved Instances: commit to an instance configuration for 1 or 3 years. Standard (up to ~72%) or Convertible (up to ~66%, can change family). Zonal RIs also reserve capacity. AWS now recommends Savings Plans for most cases.
- Spot: spare capacity at up to ~90% off, reclaimed with a 2-minute notice. Use for stateless, fault-tolerant work: batch, CI, big data, containers. Diversify instance types and use the capacity-optimised allocation strategy.
- Dedicated Hosts give you a whole physical server (bring-your-own per-socket/core licences, compliance). Dedicated Instances run on single-tenant hardware without host control. On-Demand Capacity Reservations reserve capacity in an AZ without a discount.
- Other levers: right-sizing (Compute Optimizer), Graviton, auto scaling to zero at night, S3 lifecycle and Intelligent-Tiering, deleting idle EBS volumes and old snapshots, VPC endpoints instead of NAT for S3 traffic, and Cost Explorer, Budgets and cost allocation tags.
Interview questions
- Explain the EC2 purchasing options and when to use each.
- Savings Plans vs Reserved Instances?
- How do you handle Spot interruptions?
- Your AWS bill doubled. How do you investigate?
Auto Scaling & Elastic Load Balancing (ALB vs NLB vs GWLB)
An Auto Scaling group keeps the right number of healthy instances across AZs; a load balancer spreads traffic and health-checks them.
- ASG settings: launch template, subnets in ≥2 AZs, min / desired / max capacity, and health checks (EC2 status or ELB health checks, which you should enable behind a load balancer).
- Scaling policies: target tracking (keep CPU at 50%, or requests per target), step, scheduled, and predictive scaling (learns daily patterns). Instance warm-up stops premature scaling decisions.
- Lifecycle hooks pause instances while launching or terminating (to install agents or drain work). Instance refresh rolls out a new launch template gradually.
- ALB (layer 7): routes by path, host, header, query and method; targets are instances, IPs, Lambda functions or containers; supports HTTP/2, gRPC, WebSockets, OIDC/Cognito auth, WAF.
- NLB (layer 4): TCP/UDP/TLS, millions of requests per second, very low latency, static IP / Elastic IP per AZ, preserves client IP, and fronts PrivateLink services.
- GWLB (layer 3): transparently inserts third-party firewalls/IDS appliances using GENEVE on port 6081. CLB is legacy.
Interview questions
- ALB vs NLB: how do you choose?
- Target tracking vs step vs scheduled scaling?
- How does an ASG make an app highly available?
Containers: ECS vs EKS vs Fargate
ECS and EKS are orchestrators; Fargate is a serverless way to run their tasks/pods without managing EC2 nodes.
- ECR stores container images (private registries, scanning, lifecycle rules, cross-Region replication).
- ECS is AWS's own orchestrator: task definition (image, CPU/memory, ports, roles), service (keeps N tasks running, integrates with ALB), cluster. Simple, deeply integrated, no control-plane fee.
- EKS is managed Kubernetes: AWS runs the control plane (hourly fee); you get the full Kubernetes API and ecosystem (Helm, operators). Nodes: managed node groups, Karpenter, EKS Auto Mode or Fargate.
- Fargate runs each task/pod in its own micro-VM: no nodes to patch or scale, pay per vCPU and GB-second. Trade-offs: higher unit price, no privileged containers or DaemonSets, less control.
- ECS IAM: the task execution role lets the agent pull images and write logs; the task role is what your app code uses to call AWS.
- Choose by team skills and portability: ECS + Fargate for the least ops on AWS; EKS when you need Kubernetes portability or its ecosystem.
Interview questions
- ECS vs EKS?
- What is Fargate and when would you not use it?
- Task role vs task execution role in ECS?
Networking & content delivery
VPC: CIDR, subnets, IGW, NAT gateway & route tables
A VPC is your private network in a Region; subnets live in one AZ, and route tables decide if a subnet is public or private.
- A VPC has an IPv4 CIDR from
/16(65,536 addresses) to/28(16). Use RFC 1918 ranges and plan non-overlapping CIDRs if you will ever peer or connect on-prem. - A subnet is a slice of the CIDR in one AZ. AWS reserves 5 addresses per subnet: network,
.1router,.2DNS,.3reserved, and broadcast. - Route tables attach to subnets. The
localroute lets everything in the VPC talk. A public subnet has0.0.0.0/0 → igw-…; a private subnet does not. - Internet Gateway: horizontally scaled, free, one per VPC, does 1:1 NAT for instances with public IPs. Both directions.
- NAT gateway: lives in a public subnet in one AZ, lets private instances reach out but blocks inbound connections. Put one per AZ for HA and to avoid cross-AZ traffic. Billed per hour and per GB.
- IPv6: addresses are public, so use an egress-only internet gateway for outbound-only access.
Interview questions
- What makes a subnet public vs private?
- Internet Gateway vs NAT gateway?
- How many usable IPs are in a /24 subnet on AWS?
Security groups vs NACLs, peering vs Transit Gateway, endpoints & PrivateLink
Security groups and NACLs filter traffic; peering, Transit Gateway and PrivateLink connect networks and services privately.
- Security groups: stateful (return traffic allowed automatically), allow rules only, applied to ENIs, all rules evaluated. Can reference other SGs (
app-sgallows 5432 fromweb-sg). - NACLs: stateless (allow the return path, usually ephemeral ports 1024–65535), allow and deny rules, evaluated in number order, first match wins, apply to the whole subnet. Good for blocking a bad IP range.
- VPC peering: private 1:1 link between two VPCs (same or different account/Region). Non-transitive, no overlapping CIDRs, routes needed on both sides. Cheap, no bandwidth bottleneck.
- Transit Gateway: regional hub that connects many VPCs, VPNs and Direct Connect with its own route tables. Transitive routing and segmentation; charged per attachment and per GB.
- Gateway endpoints (S3 and DynamoDB only) are a route-table entry and free. Interface endpoints create ENIs with private IPs for most AWS services via PrivateLink; billed per hour per AZ and per GB.
- PrivateLink also exposes *your* service (behind an NLB) to other VPCs/accounts one-way, with no CIDR overlap concerns. Hybrid: Site-to-Site VPN (quick, over the internet) vs Direct Connect (dedicated private line).
Interview questions
- Security group vs NACL?
- VPC peering vs Transit Gateway?
- Gateway endpoint vs interface endpoint?
- An instance in a private subnet cannot reach the internet. How do you debug?
CloudFront & Route 53 routing policies
CloudFront caches content at the edge; Route 53 is DNS with health checks and smart routing policies.
- CloudFront: a CDN with edge locations and regional edge caches. Origins: S3, ALB, EC2, API Gateway, any HTTP server. Cache behaviours per path, TTLs, cache policies, invalidations.
- Lock S3 origins with Origin Access Control (OAC), the successor to OAI, so the bucket stays private and only CloudFront can read it.
- Edge logic: CloudFront Functions (lightweight JS for headers, redirects, URL rewrites) vs Lambda@Edge (Node/Python, network access, longer runtime). Private content via signed URLs or signed cookies.
- Security at the edge: TLS with ACM certificates (in
us-east-1for CloudFront), AWS WAF, and Shield Standard (DDoS protection, free). - Route 53: authoritative DNS, domain registration, health checks, private hosted zones for VPCs. Alias records point to AWS resources, work at the zone apex and are free for queries to AWS targets.
- Global Accelerator gives two static anycast IPs and routes TCP/UDP over the AWS backbone; unlike CloudFront it does not cache.
Interview questions
- How does CloudFront improve performance and security?
- Alias record vs CNAME?
- Latency vs geolocation routing?
Storage & databases
S3: storage classes, lifecycle, versioning, security & hosting
S3 is regional object storage with 11 nines of durability; pick a storage class by access pattern and lock it down with policies and encryption.
- Objects live in buckets (globally unique names, regional data). Keys are flat;
/is just part of the name. Designed for 99.999999999% durability. - Strong read-after-write consistency for all PUTs, overwrites, deletes and LISTs (since December 2020). Use multipart upload for large objects and parallel speed.
- Versioning keeps every version; deletes add a delete marker. Combine with MFA Delete or Object Lock (WORM, governance/compliance modes) for ransomware protection.
- Lifecycle rules transition objects to cheaper classes after N days and expire old objects, old noncurrent versions and incomplete multipart uploads.
- Encryption: SSE-S3 is the default for all new objects; SSE-KMS adds key control and audit; DSSE-KMS double-layer; SSE-C customer-provided keys; or client-side encryption.
- Access: Block Public Access on by default, ACLs disabled by default (bucket owner enforced). Use IAM + bucket policies. Presigned URLs grant time-limited access to one object without sharing credentials.
- Static website hosting uses an HTTP-only website endpoint; for HTTPS and a custom domain, put CloudFront with OAC in front of a private bucket.
Interview questions
- How would you choose an S3 storage class?
- How do presigned URLs work and when do you use them?
- What consistency model does S3 have?
- How do you secure an S3 bucket?
RDS vs Aurora vs DynamoDB, plus ElastiCache
RDS and Aurora are managed relational databases; DynamoDB is serverless key-value/document; ElastiCache is an in-memory cache.
- RDS: managed PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, Db2. AWS handles backups (point-in-time restore), patching, Multi-AZ failover. You pick the instance size and storage.
- Multi-AZ = synchronous standby for HA (automatic failover, DNS name stays the same). Read replicas = asynchronous copies for read scaling (and cross-Region DR); they can be promoted.
- Aurora: MySQL/PostgreSQL-compatible, storage decoupled from compute, 6 copies across 3 AZs, auto-growing storage, up to 15 low-lag replicas, fast failover, Global Database for cross-Region DR, and Aurora Serverless v2 for automatic capacity scaling.
- DynamoDB: serverless NoSQL with single-digit ms latency at any scale. Design around access patterns: partition key (+ optional sort key), GSIs/LSIs, items up to 400 KB. On-demand or provisioned capacity.
- DynamoDB extras: eventually or strongly consistent reads, transactions, Streams (change data capture to Lambda), TTL, global tables (multi-Region active-active), DAX cache, PITR backups.
- ElastiCache (Valkey, Redis OSS, Memcached): in-memory cache for sessions, leaderboards, hot reads. Patterns: lazy loading (cache-aside) and write-through; always set a TTL.
Interview questions
- Multi-AZ vs read replicas?
- RDS vs Aurora?
- When would you choose DynamoDB over a relational database?
- Explain lazy loading vs write-through caching.
Serverless & integration
Lambda & API Gateway
Lambda runs functions on events and bills per ms; API Gateway turns them (or any backend) into managed HTTP and WebSocket APIs.
- Limits to remember: memory 128 MB–10,240 MB (CPU scales with memory, ~1 vCPU at 1,769 MB),
/tmp512 MB–10,240 MB, payload 6 MB sync / 1 MB async, 250 MB unzipped package (10 GB container image), default 1,000 concurrent executions per Region. Max timeout was famously 15 minutes; the current Lambda quotas page lists 1,800 s (30 min), so state the number and say you would confirm it. - Invocation types: synchronous (API Gateway, ALB; caller waits), asynchronous (S3, SNS, EventBridge; Lambda queues and retries twice, then sends to a DLQ or failure destination), event source mapping (Lambda polls SQS, Kinesis, DynamoDB Streams, MSK in batches).
- Cold start: creating a new execution environment, downloading code and running init. Larger packages, VPC-heavy init and JVM runtimes make it worse. Fixes: smaller packages, init outside the handler, provisioned concurrency, SnapStart (Java, Python, .NET).
- Reserved concurrency caps a function and guarantees it that share; provisioned concurrency keeps environments pre-initialised (costs money). Throttled sync calls return 429.
- API Gateway flavours: REST API (usage plans, API keys, caching, request validation, WAF), HTTP API (cheaper, faster, JWT authorizers), WebSocket API. Integration timeout default 29 s; payload 10 MB.
- Auth options: IAM (SigV4), Cognito user pools, Lambda authorizers, JWT authorizers (HTTP API). Throttling via stage/method limits and usage plans.
Interview questions
- What is a Lambda cold start and how do you reduce it?
- Reserved vs provisioned concurrency?
- REST API vs HTTP API in API Gateway?
- Your Lambda-backed API is returning 429s and 502s under load. What do you check?
SQS vs SNS vs EventBridge vs Kinesis
Queues decouple producers from one consumer group, topics fan out, buses route events by content, and streams keep ordered, replayable records.
- SQS Standard: nearly unlimited throughput, at-least-once delivery, best-effort order. FIFO: ordered per
MessageGroupId, exactly-once processing with deduplication, 300 TPS per action (3,000 msg/s with batching), more with high-throughput mode. - SQS mechanics: consumers poll; a received message is hidden for the visibility timeout (default 30 s) and must be deleted after success; long polling up to 20 s; retention 1 min–14 days (default 4); max message 1 MiB; failures go to a DLQ after
maxReceiveCount. - SNS: pub/sub push to many subscribers (SQS, Lambda, HTTP, email, SMS, Firehose) with filter policies. Standard or FIFO topics. SNS → multiple SQS queues is the classic fan-out.
- EventBridge: serverless event bus. Rules match on event content and route to 20+ target types; receives AWS service events and SaaS partner events; schema registry, archive & replay, Pipes (source → filter → enrich → target) and Scheduler.
- Kinesis Data Streams: ordered records per shard (by partition key), multiple consumers read the same data, replay within retention (24 h default, up to 365 days). Per shard: 1 MB/s or 1,000 records/s in, 2 MB/s out. On-demand or provisioned capacity.
- Amazon Data Firehose loads streams into S3, Redshift, OpenSearch and others with buffering and transformation. Amazon MSK is managed Kafka when you need the Kafka API.
Interview questions
- SQS vs SNS?
- SNS vs EventBridge?
- When would you choose Kinesis over SQS?
- What is a visibility timeout and what is a DLQ?
Operations & architecture
CloudWatch, CloudTrail & friends
CloudWatch answers "how is my system behaving?"; CloudTrail answers "who called which API, and when?".
- CloudWatch Metrics: built-in service metrics (EC2 basic monitoring every 5 min, detailed every 1 min) plus custom metrics. EC2 memory and disk usage need the CloudWatch agent.
- CloudWatch Alarms watch a metric (or a metric math expression or composite of alarms) and trigger SNS, Auto Scaling or EC2 actions.
- CloudWatch Logs: log groups/streams, retention settings, Logs Insights queries, metric filters, subscription filters to Lambda/Firehose. Container Insights and Application Signals add higher-level views.
- CloudTrail: records API calls (who, what, when, from where). Event history keeps 90 days of management events for free; create a trail to store events in S3 long term (org trail for all accounts). Data events (S3 object, Lambda invoke) are opt-in and billed.
- Related: AWS Config (resource configuration history and compliance rules), X-Ray (distributed tracing), GuardDuty (threat detection), Security Hub (findings in one place).
- Events from all of these can go to EventBridge for automated responses (for example, auto-remediate a public bucket).
Interview questions
- CloudWatch vs CloudTrail?
- How do you monitor memory usage on EC2?
- How would you detect and respond to someone making an S3 bucket public?
Infrastructure as Code: CloudFormation, CDK & Terraform
Describe infrastructure in versioned code, review changes as diffs, and let a tool create, update and roll back resources.
- CloudFormation: AWS-native YAML/JSON templates deployed as stacks. Features: parameters, outputs, intrinsic functions (
!Ref,!GetAtt,!Sub), change sets (preview), automatic rollback, drift detection, StackSets (many accounts/Regions), nested stacks. - CDK: write infrastructure in TypeScript, Python, Java, C# or Go;
cdk synthproduces CloudFormation. Constructs: L1 (rawCfn*), L2 (sensible defaults,grant*helpers), L3 patterns. - Terraform: HCL, multi-cloud, provider ecosystem. Keeps a state file;
planshows the diff,applymakes it. Store state remotely (S3 backend with native lock file in recent versions) and never edit it by hand. - Common practices: one stack per lifecycle/team boundary, separate environments, code review on plans/change sets, CI/CD pipelines, policy-as-code (cfn-guard, OPA/Checkov), and no manual console changes.
- Protect stateful resources:
DeletionPolicy: Retain/Snapshotin CloudFormation,prevent_destroyin Terraform, termination protection on stacks.
Interview questions
- CloudFormation vs Terraform?
- What is drift and how do you handle it?
Well-Architected pillars, high availability & disaster recovery
Six pillars guide design reviews; HA keeps you up through AZ failures, DR gets you back after a Region-level disaster within your RTO/RPO.
- Six pillars: Operational Excellence (IaC, small reversible changes, runbooks), Security (identity, traceability, encryption, least privilege), Reliability (recover automatically, scale horizontally, test recovery), Performance Efficiency (right resources, go global), Cost Optimization (pay for what you use, measure), Sustainability (maximise utilisation, managed services).
- RPO (recovery point objective): how much data you can lose, measured in time. RTO (recovery time objective): how long you can be down. Lower values cost more.
- High availability inside a Region: multi-AZ everything — ALB + ASG across AZs, RDS Multi-AZ/Aurora, NAT per AZ, stateless app servers, health checks and auto-healing.
- DR strategies, in rising cost: backup & restore (hours), pilot light (core data replicated, compute off; tens of minutes), warm standby (scaled-down full copy running; minutes), multi-site active/active (near zero).
- Tools: AWS Backup (central policies, cross-Region/account copies), S3 Cross-Region Replication, Aurora Global Database, DynamoDB global tables, AWS Elastic Disaster Recovery (block-level replication of servers), Route 53 failover records, Application Recovery Controller.
- A DR plan that has never been tested is a hope. Run game days, use AWS Fault Injection Service, and automate failover runbooks.
Interview questions
- Name the six pillars of the Well-Architected Framework.
- Explain RTO vs RPO with an example.
- Pilot light vs warm standby?
- How would you design a multi-Region active/active application?
Design scenarios: 3-tier web app & serverless API
Talk through layers, HA, security, scaling, cost and failure modes, naming the AWS service and the reason for each choice.
- 3-tier web app: Route 53 → CloudFront (+ WAF) → ALB in public subnets → ASG/ECS in private app subnets across 2–3 AZs → Aurora/RDS Multi-AZ in private data subnets, ElastiCache for sessions/hot reads, S3 for static assets and uploads.
- Security: SG chaining (ALB SG → app SG → DB SG), secrets in Secrets Manager, KMS encryption at rest, TLS everywhere, IAM roles for instances/tasks, no SSH (Session Manager), CloudTrail + GuardDuty.
- Scaling and resilience: stateless app tier (sessions in ElastiCache/DynamoDB), target-tracking scaling, read replicas, CloudFront caching, SQS for slow background jobs, backups + cross-Region copies for DR.
- Serverless API: Route 53 → (CloudFront) → API Gateway (Cognito/JWT auth, throttling, WAF) → Lambda → DynamoDB; S3 + presigned URLs for files; EventBridge/SQS for async side effects; Step Functions for multi-step workflows.
- Serverless trade-offs: scales to zero and pay-per-use, little ops; but watch cold starts, concurrency limits, 29 s API timeout, per-request cost at very high steady load, and design for idempotency and retries.
- Always close with observability (CloudWatch dashboards, alarms, X-Ray), IaC + CI/CD, and a cost estimate.
Interview questions
- Design a highly available 3-tier web application on AWS.
- Design a serverless REST API for an order service.
- Your monolith on one EC2 instance keeps going down under load. What's your migration plan?
- How would you handle a sudden 10× traffic spike on the serverless design?