Amazon ECS now exposes runtime ContainerIds to APIs and ECS Console

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.

To get started, you can use the AWS command-line interface through the ECS  describe-tasks and stop-task API calls or the task-details view in the ECS console.