containers-roadmap
containers-roadmap copied to clipboard
[ECS] [request]: Allow setting log retention for awslog driver
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request Currently, setting the log retention period via awslog driver isn't available, it would be great to have the ability to set this.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html#create_awslogs_logdriver_options
Which service(s) is this request for? This could be Fargate, ECS
Hi @jsha09, thanks for letting us know your request!
Considering the logConfiguration
is a part of task definition, it can be different in each task definition revision across the same task def family. So what do you expect (or the best behavior for you) when a new task def revision defines it "7 days" which was originally "3 days" for example? Also what do you expect to happen in the case of tasks' rollback?
I'm not the original reporter, but I'd expect it to use the latest task definition. In your example I'd expect the retention to be 7 days. If the task is rolled back, I'd expect it to go back to 3 days.
Are there workarounds to this? How do we set the retention of such log groups?
@toricls this is blocking us from having firm controls on our CW log groups. We are working on cost reduction across thousands of log groups spanning thousands of clusters. Is there a workaround suggested?