cloudmapper icon indicating copy to clipboard operation
cloudmapper copied to clipboard

Is there a way to list the resources identified?

Open vforvarun opened this issue 8 years ago • 2 comments

Hi,

I stumbled upon this tool recently and found it to be very useful..! Thank you..!

The stats command is useful to count the number of AWS resources and it also generates a beautiful graph. But it would be really useful if it can have a table to all the AWS resources identified in the recent collect run. Alternatively, a command option to list the resources would be useful.

python cloudmapper.py list ec2 -accounts

With regards,

Varun

vforvarun avatar Oct 03 '18 06:10 vforvarun

There is not a way to to that built into the tool. You would have to look at the stats code and find the count that interests you: https://github.com/duo-labs/cloudmapper/blob/3afb111d39e7db4b60e84e7816dd08a34e673df9/commands/stats.py#L25

Then you could run jq on the account-data directory with something like:

jq '.Reservations[].Instances' account-data/*/*/ec2-describe-instances.json

It's hard to know what info people would want to see in a table for the different resources. For example instance id? The name as identified from a tag?

I've stayed away from trying to identify that, and instead just leave it up to people to query the account-data directory as needed.

0xdabbad00 avatar Oct 03 '18 15:10 0xdabbad00

Thank you for your response, Scott.

I like your approach and will follow your advice. I was just wondering if there was something that was built into the tool and thought of asking way. Your answer provides the clarification I need. Thank you..!

With regards,

Varun

vforvarun avatar Oct 03 '18 23:10 vforvarun