This example code provided with the blog, provides a solution to track all tasks that run in a service's lifetime and then associate a cost for the ECS service (considering every task's resource reservations and the amount of time the task ran). -
View it on GitHub