How to: Load Balanced Web Service retention period set to never expire
Hello good day!
How can we set the retention period of the ECS to never expire?
Docs here and here did not specify how we can do it in the manifest.yml.
Hello @rickychew77. From https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html it seems like by default it doesn't expire. You can either set it to be a huge number in the manifest or remove this setting using yaml patch override
- op: remove
path: /Resources/LogGroup/Properties/RetentionInDays
However, ideally we should provide an option for non-expire.
Yes that is default in AWS however it seems copilot has defaulted it to be 30 days, those cloudwatch log group that created without using logging.retention in manifest.yml has only 30 days retention by default and does seems to be able to make it not expire from the manifest, unless using yaml patch override above (which i think it's bit not as intuitive though).