aws-cleanup

0.1.1 • Public • Published

aws-cleanup

This project helps to terminate/delete all the resources in a given AWS account.

This is particularly useful if you are learning to work with AWS & don't want to accidentally leave any service in running state only to find out that you have been charged on your credit card at month end.

Installing

You would require node.js installed on your system to use aws-cleanup. In case its not already installed, you can get it from here: http://nodejs.org/

You can get the code & required modules (including AWS-SDK for node.js) by executing the following commands

git clone https://github.com/hsachdevah/aws-cleanup.git
cd aws-cleanup
npm install

You can execute the cleanup task by running cleanup.js. You would be asked to provide access-key & secret-access-key, please make sure you have all the required permissions for terminating/deleting resources.

node cleanup.js

Note: You can also store credentials locally so you don't have to enter them every time you execute the cleanup task. Create a file with name "aws-credentials.json" in the same directory as cleanup.js with the following content

{ 
	"accessKeyId": "<your AWS access key>", 
	"secretAccessKey": "<your AWS secret key>", 
	"region": "us-east-1" 
}

The given access key & secret key should have all the permissions to list/delete AWS resources.

Supported Services

The following services are supported in latest version:

Service Name Notes
EC2 Only instances with status 'running' will get terminated.
Elastic IP Only EIPs with scope 'vpc' will get released
ELB
RDS Only DB instances with status 'available' will get deleted

Readme

Keywords

none

Package Sidebar

Install

npm i aws-cleanup

Weekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • hsachdevah