cost_by_account_dashboard_account_costscost_by_account_dashboard_accounts_inputcost_by_account_dashboard_monthly_costcost_by_account_dashboard_total_accountscost_by_account_dashboard_total_costcost_by_region_dashboard_accounts_inputcost_by_region_dashboard_monthly_costcost_by_region_dashboard_region_costscost_by_region_dashboard_top_10_regionscost_by_region_dashboard_total_accountscost_by_region_dashboard_total_costcost_by_region_dashboard_total_regionscost_by_service_dashboard_accounts_inputcost_by_service_dashboard_monthly_costcost_by_service_dashboard_service_costscost_by_service_dashboard_top_10_servicescost_by_service_dashboard_total_accountscost_by_service_dashboard_total_costcost_by_service_dashboard_total_servicescost_by_tag_dashboard_accounts_inputcost_by_tag_dashboard_monthly_costcost_by_tag_dashboard_tag_key_inputcost_by_tag_dashboard_tag_value_costscost_by_tag_dashboard_top_10_tag_valuescost_by_tag_dashboard_total_accountscost_by_tag_dashboard_total_costoverview_dashboard_accounts_inputoverview_dashboard_daily_costoverview_dashboard_monthly_costoverview_dashboard_top_10_accountsoverview_dashboard_top_10_regionsoverview_dashboard_top_10_resourcesoverview_dashboard_top_10_servicesoverview_dashboard_total_accountsoverview_dashboard_total_cost
Query: cost_by_service_dashboard_monthly_cost
Usage
powerpipe query aws_cost_and_usage_insights.query.cost_by_service_dashboard_monthly_cost
Tags
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_reportwhere ('all' in ($1) or line_item_usage_account_id in $1)group by date_trunc('month', line_item_usage_start_date), line_item_product_codeorder by date_trunc('month', line_item_usage_start_date), sum(line_item_unblended_cost) desc;
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | account_ids |
Dashboards
The query is used in the dashboards: