Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chetan/aws-sqs-cleanup
https://github.com/chetan/aws-sqs-cleanup
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/chetan/aws-sqs-cleanup
- Owner: chetan
- Created: 2014-03-17T22:26:01.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T14:17:23.000Z (almost 11 years ago)
- Last Synced: 2024-10-19T03:45:13.093Z (2 months ago)
- Language: Ruby
- Size: 148 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aws-sqs-cleanup
A simple daemon for removing EC2 instances from Chef when an Auto Scaling Group termination notice
is received on an SQS queue.### Install
```
$ git clone https://github.com/chetan/aws-sqs-cleanup.git
$ cd aws-sqs-cleanup
$ bundle install
```### Configure
You must export the following environment variables (or add them to the
command line):* AWS_ACCESS_KEY_ID
* AWS_SECRET_ACCESS_KEY
* AWS_QUEUE_NAME
* AWS_TOPIC_ARN (optional)AWS_QUEUE_NAME can be the full queue name or the name of the auto scaling group.
If AWS_TOPIC_ARN is available, then the given topic will be notified of the
restart event. The message body will be as in the sample below.### Run
```
$ ./daemon.rb
or
$ ./daemon.rb 2>&1 >cleanup_daemon.log &
```For testing, pass the dry run flag:
```
$ ./daemon.rb --dry-run
```