deleterious

command module
v0.1.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

deleterious

Helps you clean up AWS resources. This is handy when retention policies on CloudFormation stacks leave lots of orphaned AWS resources around costing money.

installation for homebrew

brew tap kindlyops/tap && brew install kindlyops/tap/deleterious

installation from source

go get github.com/kindlyops/deleterious
deleterious help

Example of deleting DynamoDB tables

Once deleterious gives you a list of things to delete, and you have manually confirmed they are ok to delete, you can make a little loop to delete the objects. Here is an example with dynamoDB tables

#!/bin/bash

# tables that need to be deleted
declare -a tables=("foo-MonkeyTable-1FDTVGZJOT25Y"
"foo-BananaTable-1HFLQZL7CVQ7L"
)

for i in "${tables[@]}"; do
	echo "deleting table: $i"
	aws dynamodb delete-table --table-name "$i"
done

Example of deleting S3 buckets

Once deleterious gives you a list of things to delete, and you have manually confirmed they are ok to delete, you can make a little loop to delete the objects. Here is an example with S3 buckets

#!/bin/bash

# buckets that need to be deleted
declare -a buckets=("foo-bananabucket-148lv5q85e3dc"
	"foo-bananabucket-14bh2oapj6a3e"
)

for i in "${buckets[@]}"; do
	echo "deleting bucket: $i"
	aws s3api delete-bucket --bucket "$i"
done

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL