Skip to content

Count supported managed DB resources.#9

Open
kanstantsink-orca wants to merge 3 commits intomainfrom
add_managed_dbs
Open

Count supported managed DB resources.#9
kanstantsink-orca wants to merge 3 commits intomainfrom
add_managed_dbs

Conversation

@kanstantsink-orca
Copy link
Copy Markdown
Collaborator

@kanstantsink-orca kanstantsink-orca commented Dec 10, 2024

[cloudshell-user@ip-10-138-161-227 ~]$ python3 aws_resource_count.py --only-current-account
Counting resources for the current account...
Region: us-east-1 (1/1)

==============
Total results:
==============
Virtual Machines Count: 0 (Workload Units: 0)
Serverless Functions Count: 2 (Workload Units: 1)
Container Images Count: 0 (Workload Units: 0)
VM Images Count: 0 (Workload Units: 0)
Serverless Containers Count: 0 (Workload Units: 0)
Container Hosts Count: 0 (Workload Units: 0)
RDS Instances and Clusters Count: 1 (Workload Units: 1)
DynamoDB Tables Count: 1 (Workload Units: 1)
Redshift Clusters Count: 1 (Workload Units: 1)
-----------------------------------------
TOTAL estimated workload units: 4

"dynamodb": {
"function": get_region_dynamodb_resources,
"display_name": "DynamoDB Tables",
"workload_units": 50
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this number come from?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need to confirm it. For now I put it same as Lambda functions

for db_instance in page["DBInstances"]:
db_engine = db_instance["Engine"]
db_engine_normalized = db_engine.replace("aurora-", "").replace("postgresql", "postgres")
if db_engine_normalized in supported_db_engines:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider size too? i.e. > 1tb

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be an option to the runner script weather to count all or under 1TB only

@amine-orca
Copy link
Copy Markdown
Collaborator

RDS Instances and Clusters Count: 1 (Workload Units: 2)
Why is the workload units higher than the count?

@amine-orca
Copy link
Copy Markdown
Collaborator

[cloudshell-user@ip-10-138-161-227 ~]$ python3 aws_resource_count.py --only-current-account
Counting resources for the current account...
Region: us-east-1 (1/1)

==============
Total results:
==============
Virtual Machines Count: 0 (Workload Units: 0)
Serverless Functions Count: 2 (Workload Units: 1)
Container Images Count: 0 (Workload Units: 0)
VM Images Count: 0 (Workload Units: 0)
Serverless Containers Count: 0 (Workload Units: 0)
Container Hosts Count: 0 (Workload Units: 0)
RDS Instances and Clusters Count: 1 (Workload Units: 1)
DynamoDB Tables Count: 1 (Workload Units: 1)
Redshift Clusters Count: 1 (Workload Units: 1)
-----------------------------------------
TOTAL estimated workload units: 4

@amine-orca amine-orca closed this Dec 10, 2024
@amine-orca amine-orca reopened this Dec 10, 2024
},
"dynamodb": {
"function": get_region_dynamodb_resources,
"display_name": "DynamoDB Tables",
Copy link
Copy Markdown
Collaborator

@amine-orca amine-orca Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we expect same display names across providers, so we should have Managed Databases and DataWarehouses

},
"redshift": {
"function": get_region_redshift_resources,
"display_name": "Redshift Clusters",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to merge the count of DDB + RedShift cause I think we want one value for DataWarehouses

Change workload units for DDB to 4
@sonarqubecloud
Copy link
Copy Markdown

@idank-orca idank-orca removed their request for review January 1, 2025 09:03
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

Successfully merging this pull request may close these issues.

3 participants