Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: AWS Cost Optimization Add Cost Optimizer Aggregate Query #109

Merged
merged 4 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
"""