Cloud Computing Tutorial · Compute · Lesson 12 of 24
Containers in the Cloud
Run containers on ECS, Fargate, EKS, Azure Container Apps, AKS, Cloud Run and GKE, and choose between them.
Options from simplest to most flexible
| Option | AWS | Azure | Google Cloud |
|---|---|---|---|
| Run a container from an image, scale to zero | App Runner | Container Apps | Cloud Run |
| Managed container orchestration without Kubernetes | ECS (on Fargate or EC2) | Container Apps | Cloud Run |
| Managed Kubernetes | EKS | AKS | GKE (Autopilot or Standard) |
| Serverless nodes for containers | Fargate | Virtual nodes / Container Instances | GKE Autopilot |
How to choose
- Cloud Run / Container Apps / App Runner: a web service or worker from an image, with scaling handled for you. Fastest path for most stateless HTTP services.
- ECS on Fargate: AWS-native, no servers or Kubernetes to manage, deep IAM integration.
- Kubernetes (EKS, AKS, GKE): many services, portability, a large ecosystem (Helm, operators, service mesh), or platform teams building an internal platform. More power, more to operate.
def recommend(services, team_knows_k8s, needs_k8s_ecosystem, scale_to_zero):
if needs_k8s_ecosystem or (services > 30 and team_knows_k8s):
return "managed Kubernetes (EKS / AKS / GKE)"
if scale_to_zero:
return "Cloud Run / Azure Container Apps / App Runner"
return "ECS on Fargate (or Container Apps / Cloud Run)"
cases = [("startup API", 3, False, False, True), ("platform team", 60, True, True, False),
("internal workers", 8, False, False, False)]
for name, *args in cases:
print(f"{name:16} -> {recommend(*args)}")
Output
startup API -> Cloud Run / Azure Container Apps / App Runner platform team -> managed Kubernetes (EKS / AKS / GKE) internal workers -> ECS on Fargate (or Container Apps / Cloud Run)
Whatever you choose: images in a private registry (ECR, ACR, Artifact Registry), workload identity instead of keys, health checks, logs to stdout, and resource sizing from measurements.
Test yourself
Which option runs containers on AWS without managing servers or Kubernetes?
ECS on FargateEKS with self-managed nodesEC2 with Docker installed by handLambda layers
Show answer
Answer: ECS on Fargate
Fargate runs ECS tasks (or EKS pods) without you managing any servers.