Skip to main content

List AWS inventory

Project description

Quick n dirty CLI for checking [AWS] inventory

Specifically design for my own personal workflow.

[AWS]: http://aws.amazon.com/

Here Be Dragons
---------------

If you're doing something serious, you should look into these better
alternatives:

* https://github.com/DrGonzo65/ec2-cli-tools - very similar package that lets
you glob
* https://github.com/mattrobenolt/ec2 - lets you query instances using django-
orm-like syntax
* awscli - official aws cli


If you're still here, here's the deal: This is a CLI for querying aws for what
instances are running and display them in a table with the same columns I have
enabled in the web interface. You can sort by specifying the headers:

voyeur name
voyeur launch_time
voyeur environment

You can filter similarily like:

voyeur environment=production

Or go crazy (show production foo sites ordered by launch time):

voyeur environment=production site=foo launch_time

I picked the columns and names so that line lengths are under 120 columns;
which is how wide my terminal is.


But Wait, There's More
----------------------

If you make the first argument `elb` or `rds`, you can list your elastic load
balancers and databases too. You can also do add `ec2` if you like being
consistent.


Example
-------

### List EC2

```bash
name environment site ip private_ip launch_time id
--------------------- ------------- ------- -------------- -------------- ------------- ----------
hodor-weg prod groot 54.85.94.132 10.0.0.2 2014-06-17 i-27fghb69
groot-elasticsearch prod hodor 10.0.0.1 2014-08-08 i-abcdcaz7
```


### List ELB

```bash
$ voyeur elb
name dns_name pool created_time
------- ------------------------------------------- ------ ------------------------
groot groot-1529220.us-east-1.elb.amazonaws.com 3 2012-02-03T01:41:02.930Z
hodor hodor-4545272.us-east-1.elb.amazonaws.com 2 2014-03-08T06:15:53.610Z
```

### List RDS

```bash
$ voyeur rds
id uri
---------- -------------------------------------------------------------------------------
groot-db postgres://iamgroot@groot-db.cya8ag0rj.us-east-1.rds.amazonaws.com:5432/groot
hodor-db postgres://iamgroot@hodor-db.cya8ag0rj.us-east-1.rds.amazonaws.com:5432/groot
```


## Installation

pip install aws-voyeur

## Usage

Configure boto following [the official instructions](http://boto.readthedocs.org/en/latest/boto_config_tut.html).

A basic configuration would just involve setting the `AWS_ACCESS_KEY_ID`,
`AWS_SECRET_ACCESS_KEY` environment variables.


## AWS IAM Policy

This library requires the Describe* permissions. You can use use the "Read Only
Access" policy template, or you can make your own with at least these
permissions:

```json
{
"Statement": [
{
"Action": [
"ec2:Describe*",
"elasticloadbalancing:Describe*",
"rds:Describe*"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-voyeur-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file aws-voyeur-0.1.2.tar.gz.

File metadata

  • Download URL: aws-voyeur-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for aws-voyeur-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3768f455723f8b88f12a804ea5628c16086699b0903040535a5e16a0b5299014
MD5 fb8f95697b2003c0a549655847dd9d2c
BLAKE2b-256 c03ffa1485f93bb000d56df52e692a624d07b7cfd113217eefeb2df198d64dff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page