AWS for DevOps — Containers
Chapter 7 — Containers on AWS
AWS offers a full container ecosystem — from image registry to orchestration to serverless compute. This chapter covers the services every DevOps engineer must know.
┌──────────────────────────────────────────────────┐
│ Containers on AWS │
│ │
│ ECR ECS EKS │
│ (Registry) (Orchestrator) (Kubernetes) │
│ ┌─────┐ ┌──────────┐ ┌──────────┐ │
│ │Image│───────▶│ Fargate │ │ Managed │ │
│ │Store│ │ or EC2 │ │ K8s │ │
│ └─────┘ └──────────┘ └──────────┘ │
│ │ │
│ Load Balancer │
│ │ │
│ Users │
└──────────────────────────────────────────────────┘
What You’ll Learn
| Section | Topic | Key Concepts |
|---|---|---|
| 7.1 | ECS — Fargate vs EC2 | Launch types, when to use which |
| 7.2 | ECR — Elastic Container Registry | Push/pull images, lifecycle policies |
| 7.3 | ECS Task Definitions | Container specs, IAM roles, logging |
| 7.4 | ECS Services & Scaling | Desired count, auto-scaling, rolling updates |
| 7.5 | ECS + ALB | Target groups, path-based routing, health checks |
| 7.6 | Practice Exercises | Hands-on scenarios |
Why Containers for DevOps?
| Without Containers | With Containers |
|---|---|
| “Works on my machine” | Same image everywhere |
| Snowflake servers | Immutable deployments |
| Slow scaling (provision VMs) | Fast scaling (seconds) |
| Dependency conflicts | Isolated environments |
| Heavy AMI builds | Lightweight image layers |
AWS Container Services at a Glance
| Service | What It Does | Analogy |
|---|---|---|
| ECR | Stores Docker images | Docker Hub, but private and AWS-integrated |
| ECS | Runs and manages containers | Docker Compose at scale, AWS-native |
| EKS | Runs Kubernetes clusters | Managed Kubernetes |
| Fargate | Serverless compute for containers | “Just run my container, don’t make me manage servers” |
| App Runner | Simplest container hosting | Heroku-like experience on AWS |
Next → ECS — Fargate vs EC2