- Newest
- Most votes
- Most comments
Hello.
Unfortunately, you cannot specify multiple log drivers simultaneously in a single ECS task definition.
So your options are either using Lambda, which you've already tried, or using FireLens to forward logs in a sidecar container.
Another option is to use Data Firehose to forward logs from CloudWatch Logs to New Relic.
This way, you don't need to create a sidecar container or Lambda, so I think you can create a relatively simple configuration.
https://docs.newrelic.com/docs/logs/forward-logs/stream-logs-using-kinesis-data-firehose/
However, please note that if you use the Data Firehose method, you cannot use the Infrequent Access class.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html
Hi,
FireLens is the recommended solution to send ECS logs to multiple destintations including partner services.
See https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html for all details
Didier
"I'm able to configure sidecar fluentbit container and use aws firelens driver. But as far as I understand, it requests custom Fluentbit config, which I need to maintenance in addition to the ECS task definition. Is there more elegant way to configure ECS task to send logs to Cloudwatch logs plus another endpoint?"
Relevant content
- AWS OFFICIALUpdated 2 years ago

Thank you, @Riku_Kobayashi.
As I wrote, I want to migrate to Cloudwatch IA logs tier, so Kinesis Data Firehose doesn't support that.
In that case, unfortunately, the only way to do this is to configure FireLens on ECS and send logs from the sidecar container to CloudWatch Logs and Newrelic.