Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cloud & DevOps Cheat Sheet

Cloud Service Models

IaaS: VMs, storage, networking (EC2, GCE, Azure VMs)
PaaS: Runtime, managed (Elastic Beanstalk, App Engine, Heroku)
SaaS: End-user apps (Gmail, Slack, Salesforce)
FaaS/Serverless: Functions (Lambda, Cloud Functions, Azure Functions)

AWS Key Services

CategoryServiceUse
ComputeEC2Virtual machines
ComputeLambdaServerless functions
ComputeECS/EKSContainer orchestration
StorageS3Object storage
StorageEBSBlock storage
StorageEFSFile storage
DatabaseRDSManaged SQL
DatabaseDynamoDBNoSQL
DatabaseElastiCacheRedis/Memcached
DatabaseAuroraMySQL/PostgreSQL compatible
NetworkVPCVirtual network
NetworkELBLoad balancer
NetworkCloudFrontCDN
NetworkRoute 53DNS
MessagingSQSQueue
MessagingSNSPub/sub
MessagingKinesisStream processing
AnalyticsAthenaQuery S3 with SQL
MLSageMakerML platform

Kubernetes Quick Reference

# Core Objects
Pod: Smallest deployable unit (1+ containers)
Deployment: Manages ReplicaSets, rolling updates
Service: Stable network endpoint (ClusterIP, NodePort, LoadBalancer)
ConfigMap/Secret: Configuration management
Ingress: HTTP routing, TLS termination
PV/PVC: Persistent storage
Namespace: Resource isolation

# Key Commands
kubectl get pods -n <namespace>
kubectl logs <pod> -f
kubectl exec -it <pod> -- /bin/bash
kubectl apply -f manifest.yaml
kubectl rollout undo deployment/<name>

Container vs VM

ContainerVM
StartupSecondsMinutes
SizeMBsGBs
IsolationProcess-levelHardware-level
OSShared kernelFull OS
Density100s per host10s per host

CI/CD Pipeline

Code → Build → Test → Stage → Deploy → Monitor

Build: Compile, lint, unit tests
Test: Integration, e2e, security scan
Stage: Canary, blue-green, rolling
Deploy: Progressive rollout
Monitor: Metrics, logs, alerts

Deployment Strategies

StrategyDowntimeRiskRollback Speed
RollingZeroMediumFast
Blue-GreenZeroLowInstant
CanaryZeroLowFast
RecreateYesHighSlow

Observability Pillars

Metrics: Numbers over time (CPU, memory, request rate, error rate)
  → Prometheus, Grafana, CloudWatch

Logging: Structured events
  → ELK Stack, Loki, CloudWatch Logs

Tracing: Request flow across services
  → Jaeger, Zipkin, OpenTelemetry

Alerting: Threshold-based notifications
  → PagerDuty, OpsGenie, Alertmanager

SLO/SLA/SLI

SLI: Service Level Indicator (measured metric, e.g., latency p99)
SLO: Service Level Objective (target, e.g., p99 < 200ms)
SLA: Service Level Agreement (contract with penalties)

Error Budget: 1 - SLO = allowed failure rate

GitOps

Git as single source of truth
Declarative infrastructure (Terraform, Pulumi)
Automated reconciliation (ArgoCD, Flux)
Pull-based deployment (cluster pulls from git)

Infrastructure as Code

ToolTypeLanguage
TerraformDeclarativeHCL
PulumiImperative/DeclarativePython/TS/Go
CloudFormationDeclarativeYAML/JSON
AnsibleProceduralYAML

Cost Optimization

  • Right-sizing instances
  • Reserved/spot instances
  • Auto-scaling policies
  • Storage tiering (S3 Standard → Glacier)
  • Delete unused resources
  • Tag everything for cost allocation

Interview Quick Tips

  1. Know the trade-offs between services (RDS vs DynamoDB, SQS vs Kinesis)
  2. Design for failure (multi-AZ, multi-region)
  3. Security: least privilege, encrypt at rest and in transit
  4. Cost matters: mention reserved capacity, spot instances
  5. Monitoring is not optional: discuss what to measure