Amazon ECS Managed Daemons can now collect json-file logs from application containers on ECS Managed Instances
Hi, it's Shiichan! Here's an ops-friendly feature that tidies up log collection on ECS.
AWS What's NewWhat was announced?
AWS What's New says Amazon ECS introduces two things:
- json-file log driver support for Amazon ECS Managed Instances
- Log driver volumes for Amazon ECS Managed Daemons
Together, these let you collect application logs with the observability agent of your choice and forward them to any destination you choose.
What changes
Application containers on ECS Managed Instances can write their logs as local files in standard Docker json-file format, which most observability agents read natively.
Managed daemons can read these files directly through a volume mount, without specifying host bind mount paths or requiring root privileges. As a result, one managed daemon on each instance can collect logs from every application container that uses the json-file log driver.
Dive Deep
ECS keeps each container's logs in a dedicated directory named with the container ID and retains them until the container is removed. So your managed daemon can use native file-based log collection and trace every log back to the container that produced it.
The setup steps:
- Set the log driver to
json-filein thelogConfigurationof your application task definition - Register a daemon task definition that specifies a volume with
logDriverVolumeConfiguration - Mount that volume into your daemon container using
mountPoints
You can configure this using the AWS Management Console, AWS CLI, API, AWS SDKs or AWS CloudFormation.
The announcement text I had was cut off before the list of supported Regions, so check the official announcement page for availability.
Wrap-up
- The json-file log driver is supported on ECS Managed Instances
- Managed Daemons can read log files directly through log driver volumes
- No host bind mounts or root privileges, and one daemon per instance covers every container
- Logs live in container-ID directories and are retained until the container is removed
This is for platform and SRE folks who want to use their favorite observability agent on ECS!