Skip to content

Orphaned Log Groups Collector deletes log groups not associated with any resources in the AWS Account.

License

Notifications You must be signed in to change notification settings

mgorski-mg/aws-orphaned-log-groups-collector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Orphaned Log Groups Collector

Orphaned Log Groups Collector deletes AWS Lambda and Amazon RDS related log groups not associated with any resources in the AWS Account.

Available on the AWS Serverless Application Repository - orphaned-log-groups-collector

Why is it helpful?

Deleting AWS resources even using CloudFormation does not delete the corresponding CloudWatch Log Groups what cause unnecessary costs.

Supported services

  • AWS Lambda
  • Amazon RDS

Getting Started

Prerequisites

Deployment

To deploy Orphaned Log Group Collector edit deploy.bat file and change

  • <stack-name> - new stack name
  • <s3-bucket-name> - s3 bucket name for code and template file needed for deployment of the AWS Lambda
  • <s3-bucket-prefix> - logical folder for the code and template file

Then run the Lambda.

Input Lambda Event

{
    "dry_run": true,
    "regions": ["us-west-1", "..."]
}

Default values

  • dry_run: true
  • regions: all regions

It is strongly recommended to use dry_run mode first!!

Scheduler

Orphaned Log Groups Collector by default is scheduled every first day of the month.

The schedule can be changed by overriding SchedulerCronParameter.

The scheduler can be disabled using SchedulerEnabledParameter.

About

Orphaned Log Groups Collector deletes log groups not associated with any resources in the AWS Account.

Topics

Resources

License

Stars

Watchers

Forks