Skip to content

Commit

Permalink
feat: AWS Cost Optimization Add Cost Optimizer Aggregate Query (#109)
Browse files Browse the repository at this point in the history
* Create Compute Optimizer Section

AWS Compute Optimizer Section

* Add Compute Optimizer Aggregate View

* Update spacing and capitalization
  • Loading branch information
jsonpr authored Oct 2, 2023
1 parent 07c0959 commit 2e21bbe
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion aws/cost/postgresql/cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,18 @@
LEFT JOIN "aws_ec2_ebs_volumes" as vols
ON costquery.line_item_resource_id = vols.volume_id
WHERE vols.volume_type = 'gp2'
"""
"""

#AWS Compute Optimizer Section
#TODO: Separate this out to a different file
COMPUTE_OPTIMIZER_RESULTS = """
CREATE OR REPLACE VIEW compute_optimizer_results as
SELECT *
FROM (SELECT *
FROM aws_computeoptimizer_ec2_instance_recommendations
FULL JOIN aws_computeoptimizer_lambda_function_recommendations on true
FULL JOIN aws_computeoptimizer_ebs_volume_recommendations on true
FULL JOIN aws_computeoptimizer_ecs_service_recommendations on true
FULL JOIN aws_computeoptimizer_autoscaling_group_recommendations on true
) as compute_opt
"""

0 comments on commit 2e21bbe

Please sign in to comment.