ec2-reaper

CLI & module for terminating instances that match tag and age requirements.


Keywords
ec2-reaper
License
BSD-3-Clause
Install
pip install ec2-reaper==0.1.8

Documentation

EC2 Reaper

Updates

CLI & module for terminating instances that match tag and age requirements.

Features

  • Searches all (or specified) regions for instances.
  • Matches instances against a tag pattern.
  • Allows instances a grace period before termination.
  • Can be used as a Python module, CLI application, or an AWS Lambda function

Usage

Tag Matchers

[{"tag": "Name", "includes": [], "excludes": ["*"]}]

This is the default tag matcher and it will match anything that lacks a Name tag.

To terminate any instance named "cirunner", the filter would look like so:

[{"tag": "Name", "includes": ["cirunner"], "excludes": []}]

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.