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

Query: overview_dashboard_top_10_resources

Usage

powerpipe query aws_cost_and_usage_insights.query.overview_dashboard_top_10_resources

SQL

select
line_item_resource_id as "Resource",
line_item_usage_account_id as "Account",
coalesce(product_region_code, 'global') as "Region",
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
)
and line_item_resource_id is not null
group by
line_item_resource_id,
line_item_usage_account_id,
coalesce(product_region_code, 'global')
order by
sum(line_item_unblended_cost) desc
limit
10;

Params

ArgsNameDefaultDescriptionVariable
$1account_ids

    Dashboards

    The query is used in the dashboards: