Break spend down by ANY combination of dimensions — THE tool for "cost by product", "by usage type", "by tag", "by region", "by cost center", "by charge type", or "which provider is this spend on". This is the ONLY tool that can do those pivots: query_costs view="detailed" returns just the pivot vocabulary (pivotsAvailable: false), and to compare two windows by any of these dimensions, use compare_periods with that group_by — it runs the two pivots for you. Group with `dimensions` (1-3, outermost first): "service", "account", "region", "provider", "service_category", "subcategory" (usage type), "usage_family", "charge_type", "charge_subtype", "tagged", "cost_center", "resource", or "tag:<key>" for any tag key. ⚠ TAG KEYS ARE CASE- AND HYPHEN-SENSITIVE — call get_available_tag_keys first and copy the key exactly; a wrong key silently returns one "untagged" row (the untagged bucket is lowercase). Scope with EXACTLY ONE of `provider`, `integration_id` or `integration_ids`. Window: `granularity` "monthly" (default) / "weekly" / "daily", plus either explicit `start_date`/`end_date` or `months_back` (default 3, counted in units of the granularity). THE BACKEND CLAMPS SILENTLY — daily to ~30 days, weekly to ~55 days, monthly to ~6 months — so the response always echoes `requestedWindow` AND `returnedWindow`, and adds a `windowNote` when they differ. Report figures against the window that was SERVED. ASYNC: this runs an Athena job. Quick pivots come back with rows; a slow one returns { jobId, status, pollAfterMs } and you call get_cost_pivot with that job_id. Jobs expire 24 hours after creation. ⚠ THE MAIN FAILURE MODE IS RESPONSE_TOO_LARGE (413) on a wide pivot — this backend returns every row in one response and does not page. The fix is FEWER DIMENSIONS or a SHORTER WINDOW, never a different `limit` (which is applied here, after sorting by `_total` desc, and cannot shrink the server-side payload). WHICH SPECIFIC RESOURCES: add "resource" as the LAST dimension to break any pivot down to individual resources — "which instances is this service's spend actually on", "which volumes are driving this account". It has FOUR rules, all checked before the job is submitted so you get a sentence instead of an error code: (1) it must be LAST in `dimensions`; (2) the pivot must be scoped with `integration_id` — never `provider` or `integration_ids`, because resource ids are only meaningful inside one connection; (3) at most 2 other dimensions before it; (4) a monthly window covers at most 3 months, not the usual 6. ⚠ READING RESOURCE ROWS (verified on prod, and NOT what you would assume): `_resource_id` and `_region` are OPTIONAL AND INDEPENDENT — a row may have both, either, or neither, within one response. Check before you use them; a missing `_resource_id` means the backend did not attribute one, NOT that the resource has no id. The displayed `resource` value is sometimes the full ARN and sometimes just a short name, so prefer `_resource_id` for console links and fall back to naming the resource without one. `resource` can also be the EMPTY STRING "" — that is spend with no resource attribution at all (support, commitment fees, tax), not a bug. And rows valued "Others" are the backend's collapse bucket: match that literal string, because such a row can still carry `_resource_id` and `_region` when only one small resource was folded into it. RELATED: get_resource_breakdown is the better tool for the SINGLE-SERVICE, SINGLE-DAY question ("what resources drove AmazonRDS on 2026-09-04") — it takes a service and a date directly and needs no job. Use a "resource" pivot when you want resources ACROSS a grouping or over several time columns. Rows use the dimension name verbatim as the key, so a tag pivot row has a literal "tag:user_app" key alongside each time column and `_total`. Read-only. Examples: { "dimensions": ["tag:user_app"], "provider": "aws", "granularity": "daily", "months_back": 14 } for daily spend by that tag; { "dimensions": ["provider", "service_category"], "provider": "aws", "granularity": "monthly", "months_back": 3 } for a monthly cross-provider category breakdown; { "dimensions": ["cost_center", "service"], "provider": "aws", "limit": 50 } for which services each cost center is spending on; { "dimensions": ["service", "resource"], "integration_id": "<id from list_integrations>", "granularity": "monthly", "months_back": 1 } for the individual resources behind each service on one connection.