Application log retention
Decision
We keep our application logs for 30 days.
Problems
The default AWS setting is to retain logs forever. We shouldn't keep logs for such a long time period since it's not necessary and can be costly.
Context
For services created by CDK, the current setting is to keep logs forever while on root account, we retain them for max 1 month. Since CDKPipeline currently doesn't support configuring log retention, this ADR only focuses on application logs.
Reasoning
There's no need to keep application logs longer than 30 days.
Consequences
We will adapt 30 days retention policy for all resources created by CDK.
How do we implement this change?
We will add the 30 days duration retention policy for all resources in CDK. For e.g.:
{
logRetention: RetentionDays.ONE_MONTH,
}
Who will implement the change?
The collect team will do it for recipient-importer.