All Projects → jckuester → awsrm

jckuester / awsrm

Licence: MIT license
A remove command for AWS resources

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
HCL
1544 projects
Makefile
30231 projects

Projects that are alternatives of or similar to awsrm

Message-Manager-Bot
A Telegram Message Manager Bot by @AbirHasan2005
Stars: ✭ 32 (-56.76%)
Mutual labels:  delete
rmfr
Node.js implementation of rm -fr – recursive removal of files and directories
Stars: ✭ 23 (-68.92%)
Mutual labels:  delete
LNSwipeCell
一套友好的、方便集成的针对cell的左滑编辑功能!
Stars: ✭ 16 (-78.38%)
Mutual labels:  delete
crud-app
❄️ A simple and beautiful CRUD application built with React.
Stars: ✭ 61 (-17.57%)
Mutual labels:  delete
mern-stack-crud
MERN stack (MongoDB, Express, React and Node.js) create read update and delete (CRUD) web application example
Stars: ✭ 142 (+91.89%)
Mutual labels:  delete
db-safedelete
Attempts to invoke force delete, if it fails - falls back to soft delete
Stars: ✭ 16 (-78.38%)
Mutual labels:  delete
gulp-rev-delete-original
Delete the original file rewritten by gulp-rev.
Stars: ✭ 28 (-62.16%)
Mutual labels:  delete
SimplePHP
A small query builder project designed to assist daily routines and speed up the process of communicating with the database.
Stars: ✭ 14 (-81.08%)
Mutual labels:  delete
parallel-corpora-tools
Tools for filtering and cleaning parallel and monolingual corpora for machine translation and other natural language processing tasks.
Stars: ✭ 35 (-52.7%)
Mutual labels:  cleaning
django-paranoid-model
Django abstract model with paranoid behavior
Stars: ✭ 17 (-77.03%)
Mutual labels:  delete
cleangeo
Cleaning geometries from spatial objects in R
Stars: ✭ 43 (-41.89%)
Mutual labels:  cleaning
object.omit
Return a copy of an object without the given keys.
Stars: ✭ 79 (+6.76%)
Mutual labels:  delete
Erasure
Chrome extension for deleting your YouTube comment history.
Stars: ✭ 48 (-35.14%)
Mutual labels:  delete
SQLiteHelper
🗄 This project comes in handy when you want to write a sql statement easily and smarter.
Stars: ✭ 57 (-22.97%)
Mutual labels:  delete
go-fastly-cli
CLI tool for interacting with Fastly CDN services via official REST API.
Stars: ✭ 14 (-81.08%)
Mutual labels:  delete
wastebasket
A crossplatform go library for moving files to the trashbin
Stars: ✭ 30 (-59.46%)
Mutual labels:  delete
facebook-cleaner
It is almost spring, so time for a pre spring cleaning. This time: taking care of your Facebook. This script can safe you a lot of time if you would try to do that by hand.
Stars: ✭ 52 (-29.73%)
Mutual labels:  cleaning
shredos.x86 64
Shredos Disk Eraser 64 bit for all Intel 64 bit processors as well as processors from AMD and other vendors which make compatible 64 bit chips. ShredOS - Secure disk erasure/wipe
Stars: ✭ 383 (+417.57%)
Mutual labels:  delete
cleaner robot
A simple room cleaning algorithm
Stars: ✭ 56 (-24.32%)
Mutual labels:  cleaning
aws-s3-bucket-purger
A program that will purge any AWS S3 Bucket of objects and versions quickly
Stars: ✭ 18 (-75.68%)
Mutual labels:  delete

awsrm

A remove command for AWS resources

Release Software License Travis

This command line tool follows the Unix Philosophy of doing only one thing and doing it well:

It simplifies deleting over 250 AWS resource types across multiple accounts and regions.

Like other Unix-like tools, awsrm reveals its full power when combining it via pipes with other tools, such as awsls for listing AWS resources and grep for filtering by resource attributes.

Example

Delete resources by tags (or other attributes)

To delete, for example, all EC2 instances with tag Name=foo, run

  awsls instance -a tags | grep Name=foo | awsrm

To filter on multiple attributes, display them with awsls via the -a (--attributes) <comma-separated list> flag. Every attribute in the Terraform documentation (here are the attributes for aws_instance) can be used:

  1. List resources via awsls with the attributes you want to filter on (here: -a tags)
  2. Use standard tools like grep to filter resources
  3. Pipe result to awsrm (nothing is deleted until you confirm)

Note: awsls output passes on profile and region information, so that awsrm knows for each resource in what account and region to delete it.

Depending on the type of resource, deletion can take some time. This GIF runs faster than EC2 instances are actually terminated; the shell prompt shows the real execution times in seconds.

Delete across multiple accounts and regions

List all instances with awsls in the AWS accounts associated with profile myaccount1 and myaccount2 in both regions us-west-2 and us-east-1 and pipe the result to awsrm:

awsls -p myaccount1,myaccount2 -r us-west-2,us-east-1 instance | awsrm

Delete by IDs

Delete specific resources by ID, for example, some IAM roles

awsrm iam_role db-cluster elb nginx

or VPCs

awsrm vpc vpc-1234 vpc-3456 vpc-7689

  1. List resources via awsls to find out what resources to delete.
  2. Use awsrm to delete the resources by resource type and ID(s)

Usage

Input via arguments:

awsrm [flags] <resource_type> <id> [<id>...]

Input via pipe:

awsls [flags] <resource_type> | awsrm

or

echo "<resource_type> <id> <profile> <region>" | awsrm

To see options available run awsrm --help.

Installation

Binary Releases

You can download a specific version on the releases page or use the following way to install to ./bin/:

curl -sSfL https://raw.githubusercontent.com/jckuester/awsrm/master/install.sh | sh -s v0.2.0

Homebrew

Homebrew users can install by:

brew install jckuester/tap/awsrm

For more information on Homebrew taps please see the tap documentation.

Supported resources

This tool can not only delete any resource type that is supported by awsls, but any resource type covered by the Terraform AWS Provider.

Note: the prefix aws_ for resource types is optional. This means, for example, awsrm aws_instance <id> and awsrm instance <id> are both valid commands.

Disclaimer

You are using this tool at your own risk! I will not take responsibility if you delete any critical resources in your production environments.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].