elastic-ci-stack-for-aws icon indicating copy to clipboard operation
elastic-ci-stack-for-aws copied to clipboard

Configure CloudWatch Log Group Retention

Open woodhull opened this issue 2 years ago • 1 comments

The stack seems to create a bunch of log groups in Cloudwatch logs with no retention set, meaning the logs will never expire.

Over time, this will generate a Cloudwatch storage cost that will increase over time. Customers should be able to configure the right retention time for their context, with a sensible default defined in the stack.

woodhull avatar Oct 22 '21 19:10 woodhull

It doesn’t look like Log Group retention can be configured in the CloudWatch Agent config 🤔

It wouldn’t be a backwards compatible change to start managing these existing Log Groups in the CloudFormation template either.

I’m not sure what the best strategy to set this configuration would be. There could be a Lambda based custom resource that sets the retention on the groups?

keithduncan avatar Oct 25 '21 00:10 keithduncan