Retention period for CW Logs in cloudtrial/periodic mode? #9685
-
Is it possible to set the retention period for CW Logs? I haven't found such a thing in the documentation or discussions, and when I deploy the CC policy in periodic or cloudtrail mode, the retention is set to never expire. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not at deploy time, since Custodian doesn't create those log groups when you provision a policy. They're created under the hood when a function runs. Since policy Lambda function log groups have a predictable naming pattern (generally |
Beta Was this translation helpful? Give feedback.
Not at deploy time, since Custodian doesn't create those log groups when you provision a policy. They're created under the hood when a function runs. Since policy Lambda function log groups have a predictable naming pattern (generally
/aws/lambda/custodian-<policy name>
) though, one approach is to run a policy with the retention action to configure retention for any log groups with Custodian's naming pattern.