Schedule Task questions about logging, monitoring, and general visibility

0

I have a Rails application running as a Service in ECS. I reuse the Task Definition for the application in some scheduled tasks (DB operations, backups, etc.) This works just fine but having trouble with some things.

Firstly, while the task is running I can see it in the Cluster --> Tasks ECS console. Great! However, shortly after the task ends it disappears from that list. Not only do I not know when or how it finished but now I can't even check it's configuration or anything else about it. It just disappears completely. In contrast, when I run jobs using CodeBuild the stay in the console forever and I can go back to a job that ran last week and see that it took 2 hours and finished at 2:00. Is there something in ECS that I'm missing? Is there a history of tasks somewhere that can tell me that last weeks backup task ran suceessfully?

Next is monitoring. Services show you a nice graph of resource usage (CPU, Network, etc.) However scheduled tasks don't have this at all. For example, my DB backup task is running really slowly; how do I find out if I need more CPU or network speed (or whatever)? Is there a graph somewhere like the ones they have for ECS Services?

Finally, how do you effectively log events for Scheduled Tasks? I can override certain things in a Task Definition but it seems like the Log Configuration is not one of them. So my Scheduled Task logs end up being logged to the same CloudWatch log group as my Rails application logs. This makes it pretty difficult to tease them apart in any meaningful way. Is there a way to update the AWS Logs Group or Stream Prefix for a scheduled task?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions