I am using aws batch with ECS.
ECS tasks can be configured in task definition to use awslogs logDriver and send the logs to cloudwatch, which prevent them taking up space in EC2 instance. But the ECS container agent itself also lives in a docker container and all the docker container logs for it are store in EC2 instance, which fill up the memory very quickly. Is there anyway to set up logDriver for ECS container agent itself?
Also ECS agent stores logs in /var/log/ecs/ecs-agent.log.timestamp, which also take up a lot of space. Any idea how to redirect them to cloudwatch?