turbot/tailpipe-mod-aws-cost-usage-report-insights

Query: cost_by_service_dashboard_monthly_cost

Usage

powerpipe query aws_cost_and_usage_insights.query.cost_by_service_dashboard_monthly_cost

SQL

select
strftime(date_trunc('month', line_item_usage_start_date), '%b %Y') as "Month",
coalesce(line_item_product_code, 'N/A') as "Service",
round(sum(line_item_unblended_cost), 2) as "Total Cost"
from
aws_cost_and_usage_report
where
('all' in ($1) or line_item_usage_account_id in $1)
group by
date_trunc('month', line_item_usage_start_date),
line_item_product_code
order by
date_trunc('month', line_item_usage_start_date),
sum(line_item_unblended_cost) desc;

Params

ArgsNameDefaultDescriptionVariable
$1account_ids

    Dashboards

    The query is used in the dashboards: