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
Deleting AWS resources even using CloudFormation does not delete the corresponding CloudWatch Log Groups what cause unnecessary costs.
- AWS Lambda
- Amazon RDS
- Python 3.9+
- AWS SAM CLI
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.
{
"dry_run": true,
"regions": ["us-west-1", "..."]
}
- dry_run: true
- regions: all regions
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
.