Posted On: Aug 30, 2019
Amazon Elastic Container Service (ECS) now supports the capability for customers to lookup the runtime container IDs of containers running as part of an ECS task. Previously, customers had to stitch together multiple APIs to associate the runtime container ids of containers to the respective ECS task. This association was useful for use cases such as debugging. Now, the describe-tasks and stop-task APIs return the runtime container id for all the containers within an ECS task. This means customers have a simplified workflow to diagnose errors by searching through log files for the failed containers and mapping them to respective tasks.
While debugging, customers may want to associate the errors observed in a log file with the specific task and container that generated those logs. Associating a task to a particular container previously required customers to use the inspection API by executing commands on the container instance hosting the task, which required multiple steps. By exposing the container-to-task mapping in the ECS console and the APIs, ECS customers can now trace the errors to the container and task affected, and in-turn save effort to identify the source of application failure.