elastic-ci-stack-for-aws
elastic-ci-stack-for-aws copied to clipboard
Configure CloudWatch Log Group Retention
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.
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?