Skip to content
Janiko edited this page Aug 13, 2018 · 21 revisions

Welcome to the aws-inventory wiki!

This is a very simple version of my inventory script. It should help some hackers trying (like me) to understand how AWS environments work, and to check what resources you have used end created. AWS Config does the same but is $#!* expensive.

I will try to improve my script from times to times, to add more services, and may be to inject results in some tools (to be defined).

First version

The first version was a quick and dirty try, in order to understand how to get all kind of information about AWS resources with AWS Python SDK.

Second version

This is will be an improved version, with results interpretation and a file containing all inventory information (maybe a json file).

What you need to know

This code is not designed to be invulnerable.

...and?

Take care when using cost explorer; even if all functions are read only (in AWS IAM), cost explorer is not free.

More about IAM?

The policies included here are useful to call all needed services. But I didn't check yet if this is the minimal policy; it only includes list or read permissions, though .

Configuration

You have two configuration files you need to run this script. The 1st is a list of the AWS regions (I mean: normal regions), and I guess there's no question about this one.

The next file is a AWS policy file, with all IAM rights you need to have to run the script. Remember: the less is the better in a IAM world. DO NOT provide full IAM administrative rights to any user until you know what you are doing, and NEVER connect or run scripts as root.

To do

  1. A lot of compute services to add
  2. Improve logging & displaying
  3. Genericitizing (glup)
  4. Add arguments
Clone this wiki locally