Skip to main content

ECS (Fargate)

The Monolith (Console control plane) runs on ECS Fargate.

Quick Reference

# List clusters
aws ecs list-clusters

# List services in a cluster
aws ecs list-services --cluster {env}-MonolithCluster

# Describe service (desired/running count, deployments, events)
aws ecs describe-services --cluster {env}-MonolithCluster --services {env}-MonolithService

# List running tasks
aws ecs list-tasks --cluster {env}-MonolithCluster --service-name {env}-MonolithService

# Describe a task (container status, IP, health)
aws ecs describe-tasks --cluster {env}-MonolithCluster --tasks {task-arn}

# Logs
aws logs tail staging-monolith-logs --follow

Service Details

AttributeValue
Cluster{env}-MonolithCluster
Service{env}-MonolithService
Task Def{env}-MonolithTaskDef
Container Port8000
Health CheckGET /openapi.json
Memory2048 MiB
CPU1024 (1 vCPU)
Min/Max Tasks1-4
Auto-scaleCPU/Memory at 70%
CapacityFARGATE_SPOT (non-prod), FARGATE (prod)
Log Group{env}-monolith-logs

Internal Load Balancer

The monolith is behind an internal NLB (not internet-facing), accessed via API Gateway VPC Link.

# List NLBs
aws elbv2 describe-load-balancers --query 'LoadBalancers[].[LoadBalancerName,State.Code,DNSName]' --output table

# Check target health
aws elbv2 describe-target-health --target-group-arn {tg-arn}

What to Look For

SymptomCheck
Service not respondingdescribe-services for events, check desiredCount vs runningCount
Container crash loopCheck task stoppedReason, search logs for startup errors
High latencyCheck NLB target health, container memory/CPU usage
Deployment stuckCheck deployment status in describe-services, look for circuit breaker rollback
Health check failingCheck /openapi.json is accessible, look at container logs for startup errors