Skip to main content
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": "*"
}
]
}
```

Metadata

Release files for aws-voyeur 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-voyeur 0.1.2
File Size Uploaded Provenance
aws-voyeur-0.1.2.tar.gz 4.2 kB Without provenance Details

Release files / aws-voyeur-0.1.2.tar.gz

Download URL aws-voyeur-0.1.2.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3768f455723f8b88f12a804ea5628c16086699b0903040535a5e16a0b5299014
BLAKE2b-256 checksum
How to use checksums
c03ffa1485f93bb000d56df52e692a624d07b7cfd113217eefeb2df198d64dff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for aws-voyeur 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file No provenance

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page