Search code examples
amazon-web-servicesamazon-ecsfluentdfirelens

Can I have single AWS Firelens sidecar container to fetch logs from multiple containers running in cluster?


I have ECS cluster configured on EC2 instances which has a set of services running in it. I've configured AWS Firelens sidecar container to route the ECS container logs to AWS Data firehose.

As per my current setup I have the sidecar container running for each and every ECS service in the cluster.

Lets say, If I have 3 services running, I have 3 sidecar containers running for log routing.

Is there any way were I can just have one sidecar container which can get the logs from all the containers running in the cluster?

Thanks.


Solution

  • ECS does support daemonsets though. In that case you would have one log container for each EC2 instance.

    Here is an article from AWS about using Fluent Bit as a log daemon: https://aws.amazon.com/blogs/opensource/centralized-container-logging-fluent-bit/

    Not sure about AWS Firelens though