AWS Budgets ExecModule
Overview
AwsBudgetsModule brings existing AWS budgets into ValkyrAI workflows for recurring financial reviews. Discover budgets in an authorized account, inspect one budget's definition and AWS-calculated spending, or retrieve its available budgeted-versus-actual history. FinOps and platform teams can use the returned evidence to prepare an owner review, investigate an unexpected variance, or add budget context to an engineering task.
A budget amount needs context before it becomes a useful decision. Its unit, period, cost filters, accounting options, and current calculated spending all affect what it means. This connector preserves those details as bounded native maps, keeps decimal amounts as strings, and retains provider page boundaries. It does not combine unlike budgets or calculate an account-wide spending total.
The three operations are read-only: describe_budgets, describe_budget, and describe_budget_performance_history. They do not create or change budgets, send budget notifications, inspect subscribers, execute budget actions, stop resources, or enforce spending caps. AWS-calculated forecasts can appear in a budget description when AWS supplies them; the connector does not produce its own forecasts or promise future savings.
Usage
- Identify the AWS account and existing budgets that the workflow should review.
- Create and verify an AWS
IntegrationAccount, keeping its statusREADY. - Add AWS Budgets in Workflow Studio and select the account through General > Connection. This built-in control owns the connection binding.
- Start with
describe_budgets, a 12-digitaccountId, and a bounded page size. InspecthasMorebefore treating the result as a complete inventory. - Use an observed budget name for a detail or history request. Route results to an authorized review task or report, preserving the budget's period, units, and scope.
The connector uses the commercial AWS Budgets HTTPS service, budgets.amazonaws.com, through the AWS SDK with the us-east-1 signing scope. There is no input region or custom endpoint. Supplying an account ID does not grant access to that account: AWS evaluates the selected identity's permissions on every request.
Inputs
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
operation | string | Yes | — | describe_budgets, describe_budget, or describe_budget_performance_history. |
accountId | string | Yes | — | Exactly 12 digits identifying the AWS account whose budgets are requested. Keep it a string so leading zeroes are preserved. |
budgetName | string | Detail/history only | — | Existing budget name, 1–100 characters. Colons, backslashes, /action/, and script tags are rejected. |
pageSize | integer | List/history only | 100 | Maximum entries requested per provider page, from 1 to 100. |
nextToken | string | List/history only | — | Opaque continuation of the same query and connection; at most 8,192 characters. |
returnAll | boolean | List/history only | false | Follow continuations within maxPages. This does not guarantee an exhaustive result. |
maxPages | integer | List/history only | 1 | Maximum provider pages per execution, from 1 to 20. |
startDate | string | History only, paired | — | Start of an optional history interval in strict YYYY-MM-DD format, converted to midnight UTC. Requires endDate. |
endDate | string | History only, paired | — | End of the optional history interval in strict YYYY-MM-DD format, converted to midnight UTC. Must follow startDate; maximum span is 366 days. |
Omit both dates to use AWS's available history for the selected budget. Both supplied dates are sent as midnight UTC timestamps; AWS determines the history periods covered by those bounds. AWS controls history retention and availability, so a requested interval is not a guarantee that every period will be returned.
Only documented fields are accepted. Empty inactive text fields and the shared pagination defaults are tolerated; meaningful options for a different operation fail validation. A single-budget detail request cannot use active pagination or date options. Unknown fields, raw credentials, session tokens, role assumptions, custom destinations, and arbitrary request bodies are rejected before provider access.
Outputs
Every operation returns a native map rather than an AWS SDK object.
| Output | Description |
|---|---|
status | success or error. |
operation | Selected operation. |
attempts | Provider attempts, including continued pages and retries. |
resultType | budgets, budget, or budgetPerformanceHistory. |
pagesData | Ordered complete normalized provider pages. |
pages | Number of provider pages consumed. |
hasMore | Whether a continuation remains after this execution. |
nextToken | Opaque continuation when more data is available. |
requestId | Safe AWS request identifier when available. |
error | Stable error code, redacted message, HTTP status, and retryability on failure. |
For describe_budgets, each page contains a budgets array. For describe_budget, the page contains a single budget object. Budget projections preserve the available name, type, time unit, limit, planned limits, cost filters, cost types, period, calculated actual and forecast spending, last update, and automatic-adjustment details.
For describe_budget_performance_history, each page contains budgetPerformanceHistory, including its budget identity, cost filters and types, time unit, and budgetedAndActualAmountsList. Each history entry preserves its available budgetedAmount, actualAmount, and timePeriod. Amounts retain their precise decimal value as a string and their unit; dates and timestamps use ISO representations. Optional provider values can be absent. Missing history amounts and timestamps remain absent rather than becoming zeroes or invented dates; downstream comparisons must account for incomplete evidence.
The projection covers fields available in the connector's pinned AWS SDK. Newer AWS fields such as billing-view references, filter expressions, and metrics are not included. Do not assume that a projected record describes every feature available in the current AWS console.
The module does not aggregate or deduplicate across pages. Check hasMore, preserve each period, and compare amounts only after confirming matching units and compatible budget scope. A complete page collection is still a sequence of reads rather than a transactional snapshot.
Responses fail safely instead of being silently clipped. A list or history page is bounded to 100 entries, cost filters to 100 keys with at most 100 values each, and normalized text to 1,000,000 characters per page. Oversized or malformed responses return an error rather than a partial financial result. Budget names, account IDs, allocation filters, and spending amounts can be sensitive business data; share outputs only with an authorized audience.
IntegrationAccount Requirements
Use a verified AWS IntegrationAccount in READY status through General > Connection. Its API-key field holds the access key ID and its protected password field holds the secret access key. The module consumes the platform-resolved connection and never accepts keys in workflow input.
The three read operations use the IAM permission:
budgets:ViewBudget
Scope the policy to the intended budgets and accounts where AWS supports it. The IAM permission is budgets:ViewBudget, rather than a permission invented from each API operation's name. Consult the AWS Budget Service authorization reference for supported resources and account-specific requirements. This connector needs no budget-modification or budget-action execution permission.
Session tokens, automatic role assumption, system credential discovery, China/GovCloud partitions, and custom endpoints are unsupported. Keep access-key rotation, revocation, and connection verification in the normal integration controls. Connection readiness does not establish that AWS has authorized the requested account or budget.
Configuration
The existing ExecModule retry policy controls provider attempts: three by default, configurable from one through five per request. This is module configuration rather than an input-map field. The SDK's internal retries are disabled so retry layers do not multiply attempts.
Safe reads use bounded exponential backoff beginning at 250 milliseconds for transport failures, throttling, and transient provider failures. AWS Budgets can report throttling and internal errors with HTTP 400, so use the structured retryability field rather than treating every 400 response as the same failure. Page continuation and retries increase the number of provider requests. Set a small page budget and an appropriate review cadence before scheduling repeated inventory reads.
Operations
Discover existing budgets
describe_budgets retrieves budget definitions for the requested account. Use it to prepare a review inventory or select the exact name for a follow-up detail request. A returned budget is evidence of configuration visible to the selected identity, not proof that a spending cap is enforced or that notification delivery is working.
Inspect a budget
describe_budget returns one named budget. Review its limit alongside the period, cost filters, accounting options, and calculated spending that AWS supplies. For example, a platform team can attach this context to a cost investigation before deciding whether additional analysis is needed. The module does not determine whether a charge is correct or authorize a remediation.
Review budget performance history
describe_budget_performance_history retrieves available budgeted and actual amounts for a named budget, optionally within a date interval. AWS provides this history for daily, monthly, and quarterly budgets; annual budget history is unavailable. Use the periods and units to prepare a recurring budget review. The connector does not calculate a variance percentage, reconcile an invoice, or fill missing periods with invented zeroes.
Errors and Failure Modes
| Code | Meaning | Guidance |
|---|---|---|
VALIDATION_ERROR | Field, account ID, name, interval, bound, or operation-specific option is invalid. | Correct input before another provider call. |
UNSUPPORTED_OPERATION | Operation is outside the three-operation read contract. | Select a documented operation. |
INTEGRATION_ACCOUNT_ERROR | Connection is missing, unverified, not READY, incomplete, or supplied through forbidden raw fields. | Repair and verify the selected AWS connection. |
AWS_BUDGETS_HTTP_400 | AWS rejected permissions, a name, an interval, or a continuation; some transient errors also use 400. | Inspect the safe message and retryability. Keep continuation parameters unchanged; verify permissions rather than retrying an access denial. |
AWS_BUDGETS_HTTP_429 | AWS rate limit was reached. | Reduce request frequency and retry within the configured policy. |
AWS_BUDGETS_HTTP_5xx | AWS returned a server failure. | Retry only within the configured attempt budget. |
NETWORK_ERROR | The request could not complete over the network or was interrupted. | Check connectivity and use the returned retryability flag. |
PAGINATION_ERROR | AWS returned an unsafe or repeated continuation. | Restart a bounded query; no partial result is returned. |
RESPONSE_LIMIT_ERROR | Provider output exceeded a normalization bound or was malformed. | Reduce page size or history scope; do not report the rejected output as complete. |
EXECUTION_ERROR | An unexpected execution failure prevented completion. | Inspect authorized diagnostics; the public error omits raw exception details. |
An unavailable budget, an expired token, missing billing access, or unsupported history period can be a provider failure even when local validation passed. Errors redact credentials and sensitive exception details; inspect authorized AWS-side diagnostics when more detail is necessary.
Example
A monthly engineering budget review first checks the existing budget definition:
{
"operation": "describe_budget",
"accountId": "123456789012",
"budgetName": "Engineering Monthly"
}
The expected successful envelope has status: "success", resultType: "budget", one provider page, and hasMore: false. Its pagesData[0].budget contains the observed name and available budget fields. If AWS returns a USD limit and USD actual spending, retain their decimal strings and the budget period when presenting them to the owner. Missing forecast data remains missing.
Next, request a bounded history interval for that same existing budget:
{
"operation": "describe_budget_performance_history",
"accountId": "123456789012",
"budgetName": "Engineering Monthly",
"startDate": "2026-08-01",
"endDate": "2026-11-01",
"pageSize": 25,
"returnAll": true,
"maxPages": 2
}
The successful result has resultType: "budgetPerformanceHistory". Inspect every returned budgetedAndActualAmountsList entry, keeping its time period and units, before computing a decimal-aware variance downstream. The account and name above are examples; the selected AWS identity must be authorized for the real budget.
When hasMore is true, pass nextToken into another invocation with the same operation, account, budget name, dates, and connection. Continue until exhausted or label the review incomplete. A bounded returnAll request can still leave a continuation.
Notes
- Pagination: The default execution reads one page.
returnAllfollows continuations only withinmaxPages; it does not promise all results. The module preserves complete provider pages and rejects repeated or invalid continuation behavior rather than silently claiming completion. - Financial interpretation: Budget limits, actual amounts, and forecasts retain their units and provider meaning. Different budget types, filters, and periods may not be comparable. The connector performs no aggregation, currency conversion, invoice reconciliation, or savings calculation.
- Freshness: AWS billing data and calculated spending can be delayed or revised. A successful read is not a real-time meter, and a budget is not a hard spending cap. Check provider timestamps when available.
- History: AWS controls retained periods and supports history for daily, monthly, and quarterly budgets. Annual history is unsupported. The connector limits an explicit date interval to 366 days and does not manufacture missing entries.
- Rate limits: Schedule bounded reads, avoid unnecessary polling, and account for additional page and retry requests. Some AWS Budgets rate-limit errors use HTTP 400.
- Idempotency and destructive behavior: Repeated reads do not change AWS configuration, but results can change as AWS refreshes data. There is no write idempotency key and no destructive operation in this release.
- Limits: No budget lifecycle, notification/subscriber management, budget actions, tags, role assumption, session credentials, custom endpoints, or newer billing-view/filter-expression/metrics projection.
- Validation: Deterministic request, response, retry, pagination, account, and redaction tests establish local behavior. They do not prove a particular AWS identity's live budget access or data availability; verify those before relying on a scheduled workflow.
See the AWS API references for DescribeBudgets, DescribeBudget, and DescribeBudgetPerformanceHistory.