CloudMapper stats chart


RSS feed

A few months ago I introduced the stats command to CloudMapper that displayed a simple table of the counts of resources in an account. Recently, I've added the ability to see this information as a chart.

CloudMapper stats chart

Previously you could load the stats output into Excel and generate a chart, but this automates that process.

Excel stats chart

This addition helps you understand the relative "sizes" of the accounts much more quickly, and generate nicer looking reports. I also greatly reduced the amount of things that the stats command was counting to help make this more understandable.

Custom commands

The stats command and this new graphing code is easily extendable if you want to get stats and charts for other resources, such as number of IAM users. You can make your own custom command by copying locally and renaming it to commands/ Change the resources variable to:

resources = OrderedDict([
    ('user', {
        'name': 'IAM users',
        'query': '.UserDetailList|length',
        'source': 'iam-get-account-authorization-details'}),
    ('role', {
        'name': 'IAM roles',
        'query': '.RoleDetailList|length',
        'source': 'iam-get-account-authorization-details'})

Then to get a table and chart of the users in the account, you'd call your new command with: python iam_stats --accounts demo,prod

CloudMapper IAM stats chart

If you're looking for help with your AWS security, reach out to me!