> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/aws-billing.md).

# 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.

| Connector                 | Authentication |
| ------------------------- | -------------- |
| 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**

1. Prepare the AWS Billing account or service that the workflow will access. Grant access to the required resources and operations.
2. Obtain the account, endpoint, and authentication values listed below from the service administrator.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **AWS Billing**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field                | Required                 | What to enter                                                                                                                                                                                |
| ---------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AWS Access Key ID            | Yes                      | Enter the aws access key id issued for the account or service you are connecting. [Provider instructions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html). |
| AWS Secret Access Key        | Yes                      | AWS secret paired with the access key ID above. [Provider instructions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).                                   |
| AWS Session Token (Optional) | Optional / as applicable | Session token, required only for temporary STS credentials. [Provider instructions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).                              |

#### 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**

1. Prepare the AWS Billing account or service that the workflow will access. Grant access to the required resources and operations.
2. Obtain the account, endpoint, and authentication values listed below from the service administrator.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **AWS Billing (Assume Role)**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field      | Required | What to enter                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Role ARN to Assume | Yes      | Enter the role arn to assume issued for the account or service you are connecting. [Provider instructions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html).                                                                                                                                                                                                                              |
| 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](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html). |

#### 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

1. Add the required **AWS Billing** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. 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**

| Field          | Type            | Required | Description                                                                                                                                                                                                              |
| -------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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**

| Field          | Type    | Description                                                |
| -------------- | ------- | ---------------------------------------------------------- |
| 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**

| Field          | Type            | Required | Description                                                                                                                                                                                                              |
| -------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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**

| Field          | Type    | Description                                               |
| -------------- | ------- | --------------------------------------------------------- |
| 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**

| Field               | Type            | Required | Description                                                                                                                                                                                      |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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**

| Field          | Type   | Description                                                 |
| -------------- | ------ | ----------------------------------------------------------- |
| 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**

| Field               | Type            | Required | Description                                                                                                                                                                                      |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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**

| Field          | Type   | Description                                                 |
| -------------- | ------ | ----------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                                                                                           |
| ------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field       | Type    | Description                                              |
| ----------- | ------- | -------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                                                                                           |
| ------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field         | Type    | Description                                                 |
| ------------- | ------- | ----------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                                                                                           |
| ------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field          | Type    | Description                                                   |
| -------------- | ------- | ------------------------------------------------------------- |
| 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**

| Field          | Type            | Required | Description                                                                                                                                                                                                          |
| -------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field         | Type    | Description                                              |
| ------------- | ------- | -------------------------------------------------------- |
| 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**

| Field         | Type    | Required | Description                                                                                                                                  |
| ------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field         | Type    | Description                                              |
| ------------- | ------- | -------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                  |
| ------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field              | Type    | Description                                              |
| ------------------ | ------- | -------------------------------------------------------- |
| 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**

| Field       | Type            | Required | Description                                                                                                                                                                                                       |
| ----------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field             | Type   | Description                                                   |
| ----------------- | ------ | ------------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                                                                                       |
| ------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field        | Type    | Description                                                |
| ------------ | ------- | ---------------------------------------------------------- |
| 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**

| Field         | Type            | Required | Description                                                                                                                                                                                                       |
| ------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field               | Type    | Description                                              |
| ------------------- | ------- | -------------------------------------------------------- |
| 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**

| Field                 | Type            | Required | Description                                                                                                                                                                                                                                             |
| --------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field                     | Type    | Description                                                   |
| ------------------------- | ------- | ------------------------------------------------------------- |
| 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**

| Field         | Type    | Required | Description                                                                                                                                  |
| ------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| 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**

| Field                      | Type    | Description                                                   |
| -------------------------- | ------- | ------------------------------------------------------------- |
| 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**

| Field  | Type            | Required | Description                                                                                        |
| ------ | --------------- | -------- | -------------------------------------------------------------------------------------------------- |
| Budget | select (string) | Yes      | Which budget to read. Pick one, or type its exact name. Options load from the selected connection. |

**Outputs**

| Field                   | Type    | Description                                                 |
| ----------------------- | ------- | ----------------------------------------------------------- |
| 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/aws-billing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
