Get Cost
cost_explorer.get_cost_and_usage
ActionAmazon Web Servicesconnection required
Calls the AWS cost_explorer API (SigV4).
Query AWS spend over a date range.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- AWS Cost Explorer
- Secret shape
- {"access_key_id", "secret_access_key"}
- Config it needs
- region
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
region AWS region (overrides the connection). | string | No | — | — | — |
start YYYY-MM-DD (inclusive), or YYYY-MM-DDTHH:mm:ssZ for HOURLY granularity. | string | Yes | — | matches \d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}Z)? | 2026-01-31 |
end YYYY-MM-DD (exclusive), or YYYY-MM-DDTHH:mm:ssZ for HOURLY granularity. | string | Yes | — | matches \d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}Z)? | 2026-01-31 |
granularity DAILY | MONTHLY | HOURLY. | string | No | — | — | — |
metric UnblendedCost | AmortizedCost | UsageQuantity. | string | No | — | — | — |
group_by Dimension, e.g. SERVICE or LINKED_ACCOUNT. | string | No | — | — | — |
next_token Continues a previous run of this node, using that run's next_token output. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"end": "2026-01-31",
"start": "2026-01-31"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
periods | array | — |
count | number | — |
next_token Cursor for the next page; empty when there are no further pages. | string | — |
{
"count": 0,
"next_token": "",
"periods": []
}Notes
- Global service — always signed for us-east-1.
Related AWS Cost Explorer nodes
See Get Cost run in a workflow.
In a technical demo we add the AWS Cost Explorer connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.