A gem to clean up aws lambda and Api Gateway log groups that contain a search term.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install aws_log_cleaner
AWS_ACCESS_KEYenv variables must be set.
- A credentials file must be present in
The application defaults to
eu-west-1 but this can be overridden using
AWS_REGION environment variable, or by passing -r [--region] on the commandline.
From the command line
Get help by using:
$ aws_log_cleaner -h
Run the plan command in eu-west-1 where prefix like some_text.
$ aws_log_cleaner -p -l 'some_text' -r 'eu-west-1' -k [ACCESS_KEY] -s [SECRET]
Initialise a new LogCleaner
log_cleaner = AwsLogCleaner::AwsLogCleaner.new
Run a plan
Or run a delete
After checking out the repo, run
bin/setup to install dependencies. You can also run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.