Continuing Day 11, monitor health.
Enable CloudWatch Logs
In task def, add:
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/my-task",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "ecs"
}
}
Create log group first.
Metrics and Dashboards
Console: CloudWatch > Metrics > ECS.
Create dashboard for CPU/Memory.
ECS Container Insights
Enable in ECS console for advanced metrics.
Alerts: CloudWatch > Alarms > Create (e.g., CPU > 80%).
Query logs: fields @timestamp, @message | filter @message like /error/
Today’s Takeaway
Monitored and logged!
What’s Next?
In Day 13, we’ll set up CI/CD.
Top comments (0)