cloudmapper icon indicating copy to clipboard operation
cloudmapper copied to clipboard

Doesn't collect RDS db-clusters

Open n2ygk opened this issue 5 years ago • 2 comments

Please mention the following:

  • What command was run? python cloudmapper.py collect --account myacct
  • Are you working out of a pipenv environment, Docker, or something else? pipenv

I have an Aurora Serverless database. This does not show up as an instance but only as a cluster:

(venv) cloudmapper$ aws rds describe-db-instances
{
    "DBInstances": []
}
(venv) cloudmapper$  aws rds describe-db-clusters
{
    "DBClusters": [
        {
            "AllocatedStorage": 1,
            "AvailabilityZones": [
                "us-east-1e",
                "us-east-1b",
                "us-east-1c"
            ],
            "BackupRetentionPeriod": 1,
            "DatabaseName": "xxx",
            "DBClusterIdentifier": "xxx",
            "DBClusterParameterGroup": "default.aurora5.6",
            "DBSubnetGroup": "default",
            "Status": "available",
            ...
            "VpcSecurityGroups": [
                {
                    "VpcSecurityGroupId": "sg-xxxxxxxxx",
                    "Status": "active"
                }
            ],
            ...

It appears that collect_commands.yaml does not include db-instances:

(venv) cloudmapper$ grep -nr describe-db-cluster .|grep -v venv
(venv) cloudmapper$ grep -nr describe-db-instance .|grep -v venv
./collect_commands.yaml:121:  Request: describe-db-instances
./collect_commands.yaml:133:    Value: rds-describe-db-instances.json|.DBInstances[]?|.DBInstanceArn
./shared/audit.py:625:    json_blob = query_aws(region.account, "rds-describe-db-instances", region)
./commands/prepare.py:129:    instances = query_aws(region.account, "rds-describe-db-instances", region.region)
./stats_config.yaml:15:  source: rds-describe-db-instances
(venv) cloudmapper$ 

I expect you'd want to know about clusters even for regular RDS instances that are clustered...

n2ygk avatar Mar 05 '20 21:03 n2ygk

bump, i have the same issue, rds instances isnt showing the resource count table, but does in the heat map.

v-safekeep avatar Mar 26 '21 01:03 v-safekeep

Hello @n2ygk and @v-safekeep ! If I'm not wrong, the command to collect db clusters is not there. So it's only collecting from DB instances.

Just create the PR with the changes adding those new commands :)

w0rmr1d3r avatar Mar 26 '21 07:03 w0rmr1d3r