Skip to main content
After running ag infra up prd:aws, verify everything is working before proceeding.

Check the Health Endpoint

Get your load balancer DNS from the AWS Console (EC2 → Load Balancers), then:
curl http://[LOAD_BALANCER_DNS]/health
Expected response:
{"status": "ok", "instantiated_at": "2025-01-01T12:00:00Z"}

Check CloudWatch Logs

aws logs tail /ecs/{infra_name}-prd --follow
Look for these lines indicating successful startup:
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000
Replace {infra_name} with your infra_name from settings.py (e.g., agentos-aws-template).

Check ECS Service Status

aws ecs describe-services \
  --cluster {infra_name}-prd \
  --services {infra_name}-prd-service \
  --query 'services[0].{status:status,running:runningCount,desired:desiredCount}'
Expected output:
{
    "status": "ACTIVE",
    "running": 1,
    "desired": 1
}

What Success Looks Like

CheckExpected
Health endpointReturns {"status": "ok", ...}
CloudWatch logsShows “Application startup complete”
ECS serviceRunning count matches desired count
Load balancer targetsShows “healthy” in AWS Console

If Something Is Wrong

SymptomNext Step
Health returns errorCheck CloudWatch logs
No logs appearingCheck ECS task started in AWS Console
Task keeps restartingSee Troubleshooting