copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

How to: Load Balanced Web Service retention period set to never expire

Open rickychew77 opened this issue 2 years ago • 2 comments

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.

rickychew77 avatar Jan 08 '24 03:01 rickychew77

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.

iamhopaul123 avatar Jan 09 '24 22:01 iamhopaul123

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).

rickychew77 avatar Jan 19 '24 02:01 rickychew77