Giter Club home page Giter Club logo

Comments (6)

janiko71 avatar janiko71 commented on August 13, 2024 1

Hi,

To use this program, you need to have AWS CLI installed. See here: https://aws.amazon.com/cli/.
Then you need to configure AWS CLI, with a special AWS account with minimal rights (those in the inventory*.json files).
To do it : $ aws configure

Then test your AWS CLI in command line. Ex: aws s3 ls.

Regions are retrieved dynamically so you don't need to have a aws-regions.json as in the older versions of this script.

Let me know if it helps.

from aws-inventory.

janiko71 avatar janiko71 commented on August 13, 2024

Hi,
S3 is one of the lone services that are not "regionalized". As aws-inventory uses AWS standard APIs, there's no way to request buckets region by region: the API returns all the buckets that the user is allowed to access. Of course, there could be a filter within the script, after the API call, but in that case there would not add much value compared to a web console request, while the main purpose of this script was to be "worldwide" and to gather all resources through all the AWS regions.
Nevertheless, S3 is a very special service, and maybe a specific inventory might be useful, but separated from this global script. I will take a look.

from aws-inventory.

jardelmorais avatar jardelmorais commented on August 13, 2024

Hi Janiko!

I am trying to run for the first time and I'm not a python developer, so sorry if my question is dumy, but lets go:

When I run i get the error: You must specify a region, and I didn't see the "aws-regions.json file...

Where I put the region and account information?

from aws-inventory.

jardelmorais avatar jardelmorais commented on August 13, 2024

Fine! Thank you so much, I will try this today

from aws-inventory.

guillemlc avatar guillemlc commented on August 13, 2024

@jardelmorais did this work for you?

@janiko71 thanks for the script. I was hoping to find a place where I can set teh scope for regions ( I do not want it to try every region ) as a configuration parameter.

In AWS config I can set a default region. What would be interesting to do is to pass it an array. As in here:


nb_svc = 0
nb_units_todo = 0
nb_units_done = 0
regions = []
nb_regions = 0

in config.py , but to make it a configurable list of regions you want the inventory to be made of.


As a note, this is not a solution:

https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

That sets a region per account. What if you manage more than one region per account?

Basically the default credentials, iterating over a list of regions would be perfect.

from aws-inventory.

janiko71 avatar janiko71 commented on August 13, 2024

Hi, I've added a 'regions' paramater in the DEV branch (git clone -b dev ... to get it).
To keep a coherent python syntax, it can be a single region or a list, with the same syntax as for services.
Ex : py inventory.py --regions us-east1 us-east-2 --services ec2 s3
You can test it. I'll pull it to the master branch after some tests.

from aws-inventory.

Related Issues (20)

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.