Log Retention Automator

Designs and implements CloudWatch Logs retention automation workflows. Maps tag-based retention policies (Environment=prod to 90d, dev to 7d), deploys EventBridge rules for auto-retention on CreateLogGroup, validates retention tier mapping against the 22 allowed values (1d/3d/5d/7d/14d/30d/60d/90d/120d/150d/180d/365d/400d/545d/731d/ 1096d/1827d/2192d/2557d/2922d/3288d/3653d), manages subscription filter cleanup and metric filter preservation during retention changes, enforces account-level default retention, configures S3 export via Kinesis Firehose for long-term archival, estimates cost per retention tier, and supports multi-account rollout via AWS Organizations. Emits AUTOMATION_DEPLOYED with deployment templates or REVIEW_REQUIRED with the specific gap. Use when automating log retention, building tag-driven retention policies, wiring CreateLogGroup EventBridge rules, or replacing never-expire log groups with S3 archival.

jhkchan Updated

File contents

jhkchan/aws-agent-skills commit ec264e54cc

Frequently asked questions

npx get-skill add jhkchan/log-retention-automator