Giter VIP home page Giter VIP logo

aws-inventory's Introduction

AWS Inventory

AWS Inventory tool. Useful to get summarized information on AWS account. The tool by default produces a report that can easily be read from a terminal, but it can also be used produce a tab separated output report that can be pasted into a spreadsheet and then copied to a report. This is controlled via a AWS_INVENTORY_FORMAT env variable and covered in the Format Options section.

Usage

aws-inventory acm             # report acm inventory
aws-inventory cfn             # report cfn inventory
aws-inventory cw              # report cloudwatch inventory
aws-inventory eb              # report eb inventory
aws-inventory ec2             # report ec2 inventory
aws-inventory ecs             # report ecs inventory
aws-inventory elb             # report elb inventory
aws-inventory iam             # report iam inventory
aws-inventory keypair         # report keypair inventory
aws-inventory rds             # report rds inventory
aws-inventory route53         # report route53 inventory
aws-inventory sg              # report security group inventory
aws-inventory vpc             # report vpc inventory

Example

What the output looks something like:

$ aws-inventory ec2
+-------+-------------+---------------+----------+-----------------+
| Name  | Instance Id | Instance Type | Platform | Security Groups |
+-------+-------------+---------------+----------+-----------------+
| name1 | i-123       | m3.medium     | linux    | sg-123          |
| name2 | i-456       | t2.small      | linux    | sg-456          |
+-------+-------------+---------------+----------+-----------------+
$

If you want to copy this to an spreadsheet, you can use the tab format. Here's an example with pbcopy:

export AWS_INVENTORY_FORMAT=tab
aws-inventory ec2 | pbcopy

To Check Every Region for EC2 Instances

GREEN='\033[0;32m'
NC='\033[0m' # No Color
for i in $(aws ec2 describe-regions | jq -r '.Regions[].RegionName') ; do
  echo -e "$GREEN$i$NC"
  AWS_REGION=$i aws-inventory ec2
done

Format Option

There are a few supported formats: tab, table and json. The default is table. To switch between formats use the AWS_INVENTORY_FORMAT environment variable.

export AWS_INVENTORY_FORMAT=tab
aws-inventory ec2
export AWS_INVENTORY_FORMAT=table
aws-inventory ec2
export AWS_INVENTORY_FORMAT=json
aws-inventory ec2

Install

gem install aws-inventory

Contributing

I love pull requests! Happy to answer questions to help.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

aws-inventory's People

Contributors

tongueroo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.