cloudmapper icon indicating copy to clipboard operation
cloudmapper copied to clipboard

Counting DynamoDB Tables

Open ps9786 opened this issue 5 years ago • 12 comments

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.

ps9786 avatar Sep 21 '20 14:09 ps9786

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.

0xdabbad00 avatar Sep 21 '20 15:09 0xdabbad00

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

ps9786 avatar Sep 22 '20 13:09 ps9786

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: https://github.com/duo-labs/cloudmapper/blob/9e91a9a7780d635478106a4ec46c1fc92e222be2/commands/collect.py#L456

That should help you debug.

0xdabbad00 avatar Sep 22 '20 19:09 0xdabbad00

Thanks, I'll give that ago.

Paul

ps9786 avatar Sep 22 '20 19:09 ps9786

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

w0rmr1d3r avatar Mar 15 '21 14:03 w0rmr1d3r

Ramon,

Yes, I just added -

Service: dynamodb Request: list-tables

to the collect yaml.

Thanks,

Paul

On Mon, 15 Mar 2021 at 14:41, Ramon @.***> wrote:

Did this ever get solved? @ps9786 https://github.com/ps9786 @0xdabbad00 https://github.com/0xdabbad00 Shall we create the PR for it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duo-labs/cloudmapper/issues/766#issuecomment-799474395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYTOFSYDDPAXRLXX2X253TTDYMCXANCNFSM4RUUGXIQ .

ps9786 avatar Mar 15 '21 14:03 ps9786

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

w0rmr1d3r avatar Mar 15 '21 15:03 w0rmr1d3r

Ramon,

Ah you got me there. I did it locally (bad I know) but did not think it was a resource that others would be interested in.

Paul

On Mon, 15 Mar 2021 at 15:50, Ramon @.***> wrote:

Sorry @ps9786 https://github.com/ps9786 but I can't find it, did you add it to this repo or to your fork?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duo-labs/cloudmapper/issues/766#issuecomment-799528142, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYTOFRKXEQTESD7CKWOG6DTDYUDFANCNFSM4RUUGXIQ .

ps9786 avatar Mar 15 '21 15:03 ps9786

Alright @ps9786 ! I created the PR https://github.com/duo-labs/cloudmapper/pull/858 adding what you said in this issue so this can get solved!

w0rmr1d3r avatar Mar 15 '21 16:03 w0rmr1d3r

Ramon,

Thanks, is there anything I need to do?

Paul

On Mon, 15 Mar 2021 at 16:21, Ramon @.***> wrote:

Alright @ps9786 https://github.com/ps9786 ! I created the PR #858 https://github.com/duo-labs/cloudmapper/pull/858 adding what you said in this issue so this can get solved!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/duo-labs/cloudmapper/issues/766#issuecomment-799552065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYTOFUZGBQMRNTVJKBUXODTDYXXLANCNFSM4RUUGXIQ .

ps9786 avatar Mar 16 '21 08:03 ps9786

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! :)

w0rmr1d3r avatar Mar 16 '21 08:03 w0rmr1d3r

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

0xdabbad00 avatar Nov 03 '21 18:11 0xdabbad00