Skill 24 · Architect For Startups
Subchapter 24.13
references/ecs.mdMarkdown5 KBView on GitHub
Choose ECS when: You’ve outgrown Lambda ($300-500+/month Lambda bill with steady traffic), need long-running processes, WebSockets, or >6MB responses, but don’t have a platform team to run Kubernetes.
The startup sweet spot: ECS Fargate is the “right-sized” container platform for teams of 1-15 engineers. It gives you containers without the Kubernetes learning curve, tax, or operational burden.
Do NOT start with ECS if: Your traffic is spiky/unpredictable and you can fit in Lambda’s constraints. Lambda’s scale-to-zero beats Fargate’s minimum-task cost for low-traffic services.
Fargate Spot in production services: 70% savings sounds great, but Spot tasks get terminated with 30s warning. Use ONLY for: batch jobs, queue workers, background processing. Never for user-facing APIs unless you have graceful failover to on-demand.
Over-provisioned task definitions: Startups copy-paste 2 vCPU / 4GB task defs without measuring. A typical Node.js/Python API serves 200+ req/s on 0.25 vCPU / 0.5GB (~$9/month). Start at the minimum and scale up based on Container Insights metrics.
ALB cost baseline: An ALB costs ~$22/month minimum (fixed hourly) + LCU charges. For a startup with 2-3 services, that’s fine. But don’t create one ALB per service — use path-based routing on a shared ALB until you need isolation.
NAT Gateway double-tax: Fargate tasks in private subnets need NAT for internet access. NAT costs $32/month + $0.045/GB processed. For early startups with one service, consider running in public subnets with security groups locked down (heresy, but saves $32/month). Graduate to private subnets when you have compliance requirements or >3 services.
Container Insights: Costs ~$7-15/month in CloudWatch charges per cluster. Worth it for production, not needed for dev/staging.
0.25 vCPU / 0.5GB task, minCount=1, maxCount=3ECS Exec for debugging (replaces SSH)ARM64) — 20% cheaper on Fargate tooOne cluster, one service is fine. The “one cluster per environment” guidance assumes you have environments. At pre-PMF, run one cluster with one production service. Add dev/staging clusters when you have a team that needs them.
Skip blue/green deployments initially. Rolling updates with circuit breaker give you auto-rollback without CodeDeploy complexity. Blue/green adds value at scale (instant rollback) but adds operational surface area early.
:latest tag is acceptable in dev/staging. Yes, it’s an anti-pattern in production. But for a 2-person team iterating daily, the overhead of tagging every dev build with a SHA isn’t worth it until you have a CI/CD pipeline.
Don’t multi-region until revenue demands it. ECS services in 2 regions = 2x base cost + cross-region complexity. Stay single-region until you have customers requiring <50ms latency in another continent or contractual uptime SLAs.
| Signal | Direction |
|---|---|
| Team > 15 engineers, multiple teams deploying independently | Evaluate EKS — better multi-tenancy, namespace isolation |
| Monthly compute bill > $50K with Fargate | Evaluate ECS on EC2 with Spot + Savings Plans |
| Need service mesh, custom autoscaling, GitOps | EKS ecosystem is richer for these |
| Hiring pipeline returns mostly K8s-experienced candidates | Switching cost is worth it for velocity |
tasks × hours × (vCPU_price + memory_price).