aws / containers-roadmap

This is the public roadmap for AWS container services (ECS, ECR, Fargate, and EKS).
https://aws.amazon.com/about-aws/whats-new/containers/
Other
5.21k stars 320 forks source link

[ECS] [request]: Allow setting log retention for awslog driver #1339

Open jsha09 opened 3 years ago

jsha09 commented 3 years ago

Community Note

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

toricls commented 3 years ago

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?

seeljugh commented 2 years ago

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.

g3kr commented 2 years ago

Are there workarounds to this? How do we set the retention of such log groups?

g3kr commented 2 years ago

@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?