About this project

This CDK project written in TypeScript sets up a CloudFormation stack that deploys a Lambda function to clean up leftover AWS resources. The Lambda runs hourly and deletes CloudFormation stacks and log groups matching a specified prefix and older than 24 hours. Supports cleaning roles, S3 buckets, and SSM parameters through configurable regular expressions stored in SSM parameters. Designed for environments like CI where resources may not be cleaned up properly. Configuration requires setting SSM parameters for each resource type's name pattern. Deployment needs a prefix context variable. Can also be run manually via command line.