From bba3d6e81f37f87696905f51652031be12c961a1 Mon Sep 17 00:00:00 2001 From: Dave North Date: Fri, 20 Oct 2017 13:47:13 -0400 Subject: [PATCH] update readme --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 4bfc4cf..9299241 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ # aws-target-group-cleanup Remove ALB target groups that are not assigned to load balancers + +# Purpose +Clean up target groups that no longer have a load balancer assigned + + +# Prerequisites +* `pip install boto3` +* Either an AWS role (if running on EC2) or an access key/secret key + +# Usage + +Dry run mode: +```bash +python aws-target-group-cleanup.py -r us-west-2 -p myprefix +``` + +Removal mode: +```bash +python aws-target-group-cleanup.py -r us-west-2 -p myprefix -f +``` + +Where: + +* -r is the region +* -p is an optional prefix (ie. only remove target groups starting with this) +* -f will turn on the removal (run in dryrun mode without this flag)