https://github.com/dweinstein/node-ec2-instances
https://github.com/dweinstein/node-ec2-instances
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dweinstein/node-ec2-instances
- Owner: dweinstein
- License: mit
- Created: 2015-06-12T01:14:49.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-06T20:25:53.000Z (almost 10 years ago)
- Last Synced: 2025-02-12T07:19:02.360Z (3 months ago)
- Language: JavaScript
- Size: 157 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SYNOPSIS
List ec2 using [aws-sdk-js](https://github.com/aws/aws-sdk-js) instances, organized by tags.
Assumes you've [tagged](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) your EC2 instances like:
```javascript
{ Tags:
[ { Key: 'Purpose', Value: 'MyApp' },
{ Key: 'Environment', Value: 'production' },
{ Key: 'Name', Value: 'myapp-db-node1' } ],
}
```# EXAMPLE
See [here](example.js) for code that outputs:```javascript
{
production:
[ { ip: '10.10.173.1',
name: 'myapp-prod-services01',
environment: 'production' },
{ ip: '10.10.173.2',
name: 'myapp-prod-thing',
environment: 'production' },
{ ip: '10.10.173.3',
name: 'myapp-prod-thing2',
environment: 'production' } ]
development:
[ { ip: '10.10.171.1',
name: 'myapp-dev-services01',
environment: 'development' },
{ ip: '10.10.171.2',
name: 'myapp-dev-hatchery',
environment: 'development' },
{ ip: '10.10.171.3',
name: 'myapp-dev-appnode01',
environment: 'development' } ]
}
```# CONFIGURATION (ec2rc)
Will inspect `~/.ec2rc` for config info. [These](defaults.json) are defaults.
Uses [rc](https://github.com/dominictarr/rc) [standards](https://github.com/dominictarr/rc#standards).
## example config
For example in `~/.ec2rc` you'd want to have something like this:```ini
[aws]
sslEnabled=true
accessKeyId=access-key-here
secretAccessKey=secret-key-here
region=us-west-2
```