AWS Billing
Read AWS cost and usage from Cost Explorer and AWS Budgets. Break spend down by service, account, region, tag or cost category, forecast future cost, track budgets, catch cost anomalies, and find waste in Reserved Instances, Savings Plans and oversized EC2 instances.
Connectors
Choose the connector that matches your authentication method. The options below use the names shown in StackAI.
AWS Billing
Credentials
AWS Billing (Assume Role)
Credentials
AWS Billing
Read AWS cost, usage, budgets and anomalies with a read-only IAM access key.
Set up in AWS Billing
Prepare the AWS Billing account or service that the workflow will access. Grant access to the required resources and operations.
Obtain the account, endpoint, and authentication values listed below from the service administrator.
Set up in StackAI
Open Settings → Connections, add a connection, and select AWS Billing.
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
AWS Access Key ID
Yes
Enter the aws access key id issued for the account or service you are connecting. Provider instructions.
AWS Session Token (Optional)
Optional / as applicable
Session token, required only for temporary STS credentials. Provider instructions.
AWS Billing (Assume Role)
Read AWS cost, usage, budgets and anomalies through a cross-account IAM role, with no long-lived access keys stored in Stack AI.
Set up in AWS Billing
Prepare the AWS Billing account or service that the workflow will access. Grant access to the required resources and operations.
Obtain the account, endpoint, and authentication values listed below from the service administrator.
Set up in StackAI
Open Settings → Connections, add a connection, and select AWS Billing (Assume Role).
Enter the credentials and connection details in the fields below.
Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.
Connection fields
Role ARN to Assume
Yes
Enter the role arn to assume issued for the account or service you are connecting. Provider instructions.
External ID
Yes
The External ID your role's trust policy requires. This is mandatory: without it, anyone who knows your role ARN and whose trust policy already trusts the Stack AI principal could read your billing data. Add a sts:ExternalId condition to the role's trust policy and paste the same value here. Provider instructions.
Verify the connection
Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.
If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.
Use an action
Add the required AWS Billing action to the workflow.
Select a connection when the action requests one.
Complete the required fields. Use the reference picker when a value comes from another workflow step.
Run the workflow and inspect the action’s output. Check the result before using it in a later step.
Actions
Get Cost and Usage
Read AWS spend and usage for a date range, optionally broken down by service, account, region, tag or cost category.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: month_to_date.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each time bucket. HOURLY needs to be enabled in Cost Explorer preferences and covers at most 14 days. Options load from the selected connection. Default: DAILY.
Metric
select (string)
No
Which figure to return. UnblendedCost is what most accounts are invoiced on; AmortizedCost spreads reservation and Savings Plan fees across the term. Options load from the selected connection. Default: UnblendedCost.
Group By Type
select (string)
No
Break the results down by a dimension, a tag or a cost category. Options load from the selected connection.
Group By Key
select (string)
No
What to group by. The choices follow the Group By Type: a dimension name, one of your cost allocation tag keys, or a cost category. Options load from the selected connection.
Service
select (string)
No
Limit results to one AWS service. Leave empty for all services. Options load from the selected connection.
Linked Account
select (string)
No
Limit results to one member account of the organization. Leave empty for all. Options load from the selected connection.
Charge Type
select (string)
No
Limit results to one charge type, such as Usage, Tax, Credit or Refund. Filtering to Usage excludes credits and taxes from the total. Options load from the selected connection.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Periods
array
One entry per time bucket, with totals or grouped costs.
Total Amount
number
The selected metric summed across the whole date range.
Currency
string
Currency of the returned amounts, as reported by AWS.
Start Date
string
First day covered by the results (inclusive).
End Date
string
Day after the last day covered by the results (exclusive).
Truncated
boolean
True when AWS had more pages than the page limit allowed.
Totals By Unit
object
The metric summed separately for each unit AWS reported.
Get Cost and Usage by Resource
Read AWS spend broken down to individual EC2 compute resources, such as a single instance. Covers the last 14 days only.
Inputs
Date Range
select (string)
No
Pick last_7_days, or choose 'custom' and set dates inside the last 14 days. Resource-level data does not go back further. Options load from the selected connection. Default: last_7_days.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each time bucket. HOURLY needs to be enabled in Cost Explorer preferences and covers at most 14 days. Options load from the selected connection. Default: DAILY.
Metric
select (string)
No
Which figure to return. UnblendedCost is what most accounts are invoiced on; AmortizedCost spreads reservation and Savings Plan fees across the term. Options load from the selected connection. Default: UnblendedCost.
Linked Account
select (string)
No
Limit results to one member account of the organization. Leave empty for all. Options load from the selected connection.
Charge Type
select (string)
No
Limit results to one charge type, such as Usage, Tax, Credit or Refund. Filtering to Usage excludes credits and taxes from the total. Options load from the selected connection.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Periods
array
One entry per time bucket, grouped by resource ID.
Total Amount
number
The selected metric summed across every resource.
Resource Count
number
Number of distinct resources in the results.
Truncated
boolean
True when AWS had more pages than the page limit allowed.
Totals By Unit
object
The metric summed separately for each unit AWS reported.
Get Cost Forecast
Forecast what AWS will cost over a future period, with a confidence range.
Inputs
Forecast Period
select (string)
No
How far ahead to forecast. Forecasts must start today or later; use Get Cost and Usage for spend that has already happened. Options load from the selected connection. Default: rest_of_month.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each forecast bucket. Forecasts support DAILY and MONTHLY. Options load from the selected connection. Default: MONTHLY.
Metric
select (string)
No
Which cost figure to forecast. Options load from the selected connection. Default: UNBLENDED_COST.
Prediction Interval
integer
No
Confidence level for the forecast range, as a percentage between 51 and 99.
Service
select (string)
No
Limit results to one AWS service. Leave empty for all services. Options load from the selected connection.
Linked Account
select (string)
No
Limit results to one member account of the organization. Leave empty for all. Options load from the selected connection.
Outputs
Forecast Total
number
Total forecast cost across the whole period.
Currency
string
Currency of the forecast, as reported by AWS.
Periods
array
Forecast per time bucket, with the prediction interval.
Start Date
string
First day covered by the forecast (inclusive).
End Date
string
Day after the last day covered by the forecast (exclusive).
Get Usage Forecast
Forecast how much of a service you will use over a future period, with a confidence range.
Inputs
Forecast Period
select (string)
No
How far ahead to forecast. Forecasts must start today or later; use Get Cost and Usage for spend that has already happened. Options load from the selected connection. Default: rest_of_month.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each forecast bucket. Forecasts support DAILY and MONTHLY. Options load from the selected connection. Default: MONTHLY.
Metric
select (string)
No
Which usage figure to forecast. Options load from the selected connection. Default: USAGE_QUANTITY.
Prediction Interval
integer
No
Confidence level for the forecast range, as a percentage between 51 and 99.
Service
select (string)
No
Limit results to one AWS service. Leave empty for all services. Options load from the selected connection.
Linked Account
select (string)
No
Limit results to one member account of the organization. Leave empty for all. Options load from the selected connection.
Outputs
Forecast Total
number
Total forecast usage across the whole period.
Unit
string
Unit of the forecast usage, such as Hrs or GB-Mo.
Periods
array
Forecast per time bucket, with the prediction interval.
Start Date
string
First day covered by the forecast (inclusive).
End Date
string
Day after the last day covered by the forecast (exclusive).
Get Dimension Values
List the services, accounts, regions or other dimension values that appear in your AWS cost data.
Inputs
Dimension
select (string)
Yes
Which dimension to list values for. Options load from the selected connection.
Search
string
No
Only return values containing this text. Leave empty for all.
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: month_to_date.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Values
array
Values recorded for the dimension in the period.
Total Count
number
Number of values returned.
Truncated
boolean
True when more results were available than were fetched.
Get Cost Allocation Tags
List your active cost allocation tag keys, or the values recorded for one key. Useful for building chargeback reports.
Inputs
Tag Key
select (string)
No
Leave empty to list your tag keys. Set a key to list the values recorded for that key instead. Options load from the selected connection.
Search
string
No
Only return entries containing this text.
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: month_to_date.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Tags
array
Tag keys, or tag values when a key was supplied.
Returned Keys
boolean
True when the result holds tag keys rather than tag values.
Total Count
number
Number of entries returned.
Truncated
boolean
True when more results were available than were fetched.
List Cost Categories
List the cost categories defined on the account, or the values within one category.
Inputs
Cost Category
select (string)
No
Leave empty to list your cost categories. Set one to list its values. Options load from the selected connection.
Search
string
No
Only return entries containing this text.
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: month_to_date.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Categories
array
Cost category names, or values when a category was supplied.
Returned Names
boolean
True when the result holds category names rather than values.
Total Count
number
Number of entries returned.
Truncated
boolean
True when more results were available than were fetched.
Get Cost Anomalies
List unexpected AWS spend changes that Cost Anomaly Detection flagged, with the dollar impact of each.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: last_30_days.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Monitor
select (string)
No
Limit results to anomalies found by one monitor. Leave empty for all. Options load from the selected connection.
Minimum Impact
number
No
Only return anomalies whose total dollar impact is at least this much.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Anomalies
array
Anomalies detected in the period.
Total Impact
number
Combined dollar impact of every anomaly returned.
Anomaly Count
number
Number of anomalies returned.
Truncated
boolean
True when more results were available than were fetched.
List Anomaly Monitors
List the AWS Cost Anomaly Detection monitors set up on the account.
Inputs
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Monitors
array
Anomaly monitors configured on the account.
Monitor Count
number
Number of monitors returned.
Truncated
boolean
True when more results were available than were fetched.
List Anomaly Subscriptions
List who gets alerted about AWS cost anomalies, and at what dollar threshold.
Inputs
Monitor
select (string)
No
Only return subscriptions attached to this monitor. Leave empty for all. Options load from the selected connection.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Subscriptions
array
Alert subscriptions attached to anomaly monitors.
Subscription Count
number
Number of subscriptions returned.
Truncated
boolean
True when more results were available than were fetched.
Get Savings Plans Utilization
Check how much of your AWS Savings Plans commitment was actually used, and how much was wasted.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: last_month.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each time bucket. Reservation and Savings Plans reporting supports DAILY and MONTHLY only. Options load from the selected connection. Default: MONTHLY.
Outputs
Summary
object
Commitment, usage and savings totalled over the whole period.
Periods
array
Utilization per time bucket, as returned by AWS.
Unused Commitment
number
Commitment paid for but not used, the money being wasted.
Get Reservation Utilization
Check how much of your AWS Reserved Instance capacity was actually used, and how many reserved hours went to waste.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: last_month.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each time bucket. Reservation and Savings Plans reporting supports DAILY and MONTHLY only. Options load from the selected connection. Default: MONTHLY.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Summary
object
Reserved hours purchased, used and wasted over the period.
Periods
array
Utilization per time bucket, as returned by AWS.
Unused Hours
number
Reserved hours paid for but not used.
Truncated
boolean
True when more results were available than were fetched.
Get Reservation Coverage
See how much of your eligible AWS usage was covered by reservations, and how much ran at full on-demand price.
Inputs
Date Range
select (string)
No
Pick a preset window, or choose 'custom' and set Start Date and End Date. Presets that end today include today's partial, still-estimated usage. Options load from the selected connection. Default: last_month.
Start Date
string
No
First day to include (YYYY-MM-DD). Required when Date Range is 'custom'.
End Date
string
No
Last day to include (YYYY-MM-DD). This day is included in the results. Required when Date Range is 'custom'.
Granularity
select (string)
No
Size of each time bucket. Reservation and Savings Plans reporting supports DAILY and MONTHLY only. Options load from the selected connection. Default: MONTHLY.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Summary
object
Share of eligible usage that reservations covered.
Periods
array
Coverage per time bucket, as returned by AWS.
Coverage Percentage
number
Percentage of eligible hours covered by reservations.
Truncated
boolean
True when more results were available than were fetched.
Get Rightsizing Recommendations
List AWS recommendations to downsize or terminate underused EC2 instances, with the estimated monthly saving of each.
Inputs
Recommendation Target
select (string)
No
Whether to consider only smaller sizes in the same family, or instances from other families too. Cross-family finds more savings but bigger changes. Available values: Same instance family, Across instance families. Default: SAME_INSTANCE_FAMILY.
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Recommendations
array
Per-instance rightsizing recommendations returned by AWS.
Estimated Monthly Savings
number
Total monthly saving AWS estimates from acting on every item.
Savings Currency
string
Currency of the estimated savings, as reported by AWS.
Recommendation Count
number
Number of recommendations returned.
Truncated
boolean
True when more results were available than were fetched.
List Budgets
List your AWS budgets with actual and forecast spend, and a count of those already over or heading over their limit.
Inputs
Maximum Pages
integer
No
How many result pages to fetch. AWS charges about USD 0.01 per Cost Explorer request, so each extra page adds a small cost to your own bill.
Outputs
Budgets
array
Budgets on the account with their limit, actual and forecast.
Over Budget Count
number
How many budgets have already exceeded their limit.
Forecast Over Budget Count
number
How many budgets are forecast to exceed their limit.
Budget Count
number
Number of budgets returned.
Truncated
boolean
True when more results were available than were fetched.
Get Budget
Read one AWS budget and see how much of it is spent, with flags for over budget and forecast over budget.
Inputs
Budget
select (string)
Yes
Which budget to read. Pick one, or type its exact name. Options load from the selected connection.
Outputs
Budget
object
The budget with its limit, actual spend and forecast spend.
Percentage Used
number
Actual spend as a percentage of the limit.
Is Over Budget
boolean
True when actual spend already exceeds the limit.
Is Forecast Over Budget
boolean
True when the budget is forecast to exceed its limit.
Important behavior
Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.
The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.
Last updated
Was this helpful?

