Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counting DynamoDB Tables #766

Open
ps9786 opened this issue Sep 21, 2020 · 12 comments
Open

Counting DynamoDB Tables #766

ps9786 opened this issue Sep 21, 2020 · 12 comments

Comments

@ps9786
Copy link

ps9786 commented Sep 21, 2020

Hi, I have searched the code and the yaml's but cant see any way to count the number of DynamoDB tables. Do I need to add a custom scipt?

Apologies if this has been asked before I did search for DynamoDB in the issues.

@0xdabbad00
Copy link
Collaborator

CloudMapper does not currently collect info about DynamoDB tables, as there hasn't been anything I know to audit about them and haven't had another use for them within CloudMapper. You would need to add lines to the collect configuration: https://github.com/duo-labs/cloudmapper/blob/main/collect_commands.yaml

And then add lines to the stats configuration:
https://github.com/duo-labs/cloudmapper/blob/main/stats_config.yaml

If you want to send a PR for this I'll get it merged.

@ps9786
Copy link
Author

ps9786 commented Sep 22, 2020

Thanks for the reply and info.

I successfully managed to get a count of tables but when trying to get the "Arn" for the table in order to get the Tags, I am failing.

I have this in collect

- Service: dynamodb
  Request: list-tables
- Service: dynamodb
  Request: describe-table
  Parameters:
  - Name: TableName
    Value: dynamodb-list-tables.json |.TableNames[]?|.

I can see the table names when using jq, what am I doing wrong?

Thank you.

Paul

@0xdabbad00
Copy link
Collaborator

This looks right, maybe just the space after the .json needs to be removed?
For testing, you can comment out or delete everything else in that collect_commands.yaml file, and include the --regions flag to limit the regions collected from, which will make things go faster. Then you can add some print statements around here:

That should help you debug.

@ps9786
Copy link
Author

ps9786 commented Sep 22, 2020

Thanks, I'll give that ago.

Paul

@w0rmr1d3r
Copy link
Contributor

Did this ever get solved? @ps9786 @0xdabbad00
Shall we create the PR for it?

@ps9786
Copy link
Author

ps9786 commented Mar 15, 2021 via email

@w0rmr1d3r
Copy link
Contributor

Sorry @ps9786 but I can't find it, did you add it to this repo or to your fork?

@ps9786
Copy link
Author

ps9786 commented Mar 15, 2021 via email

@w0rmr1d3r
Copy link
Contributor

Alright @ps9786 !
I created the PR #858 adding what you said in this issue so this can get solved!

@ps9786
Copy link
Author

ps9786 commented Mar 16, 2021 via email

@w0rmr1d3r
Copy link
Contributor

Hello Paul!
mmm.... review the PR and approve it if it's what you did, so the rest of us using this awesome tool can benefit from those changes too!

Thank you! :)

@0xdabbad00
Copy link
Collaborator

I merged the PR for collecting the tables, but it doesn't count the tables, so I'll leave this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants