Skip to main content

Aws/cost Explorer

@webframp/aws/cost-explorerv2026.08.10.1· 1d agoMODELS
01README

Query AWS Cost Explorer for actual spend analysis by service, usage type, and time period. Identifies top cost drivers and spend trends.

Authentication

Uses the default AWS credential chain.

Required IAM Permissions

  • ce:GetCostAndUsage

Usage

swamp model create @webframp/aws/cost-explorer aws-costs \
  --global region=us-east-1

# Spend breakdown by service (last 30 days)
swamp model method run aws-costs get_cost_by_service

# Drill into a service's usage types
swamp model method run aws-costs get_cost_by_usage_type \
  --input service=Amazon Elastic Compute Cloud - Compute

# Daily cost trend
swamp model method run aws-costs get_cost_trend --input days=30

# Top 20 cost drivers
swamp model method run aws-costs get_top_cost_drivers
02Release Notes

2026.08.10.1

Added: totalCost field in get_cost_trend output. The field contains the sum of all daily dataPoints[].amount values, pre-computed for consumers that need the window total without iterating the array (e.g. CEL expressions in workflow inputs, the operator-briefing metrics series).

2026.08.05.1

Changed: Bump @aws-sdk/* 3.1101.0 → 3.1104.0 (2 packages)

2026.08.02.1

Changed: Bump @aws-sdk/* 3.1100.0 → 3.1101.0 (2 packages)

2026.08.01.1

Fixed: Broken model-upgrade chain. The prior version bump (to 2026.07.31.1) updated version but left the upgrades array terminating one step short, which blocks swamp extension push ("model upgrade chain errors"). That version never actually published — the registry was still serving 2026.07.30.1. This release closes the chain with a no-op upgrade entry and republishes everything that had accumulated since 2026.07.30.1.

2026.07.31.1

Changed: Bump @aws-sdk/* 3.1096.0 → 3.1100.0 (2 packages)

2026.07.30.1

Added: Optional profile global argument for multi-account credential resolution. When set, credentials resolve via fromIni (supports SSO token cache and shared-config profiles). When omitted, the default credential chain applies as before. Fully backward compatible — no changes required for existing instances.

03Models1
@webframp/aws/cost-explorerv2026.08.10.1aws/cost_explorer.ts
fn get_cost_by_service()
Break down spend by AWS service for the given number of days
fn get_cost_by_usage_type(service: string)
Break down a single service's spend by usage type
ArgumentTypeDescription
servicestringAWS service name to drill into
fn get_cost_trend()
Show daily cost trend and determine if spend is increasing, decreasing, or stable
fn get_top_cost_drivers()
Identify the top cost drivers by service and usage type combination
fn get_cost_comparison()
Compare costs between current and previous period by service

Resources

costs(1h)— AWS Cost Explorer query results
04Previous Versions16
2026.08.05.1

2026.08.05.1

Changed: Bump @aws-sdk/* 3.1101.0 → 3.1104.0 (2 packages)

2026.08.02.1

Changed: Bump @aws-sdk/* 3.1100.0 → 3.1101.0 (2 packages)

2026.08.01.1

Fixed: Broken model-upgrade chain. The prior version bump (to 2026.07.31.1) updated version but left the upgrades array terminating one step short, which blocks swamp extension push ("model upgrade chain errors"). That version never actually published — the registry was still serving 2026.07.30.1. This release closes the chain with a no-op upgrade entry and republishes everything that had accumulated since 2026.07.30.1.

2026.07.31.1

Changed: Bump @aws-sdk/* 3.1096.0 → 3.1100.0 (2 packages)

2026.07.30.1

Added: Optional profile global argument for multi-account credential resolution. When set, credentials resolve via fromIni (supports SSO token cache and shared-config profiles). When omitted, the default credential chain applies as before. Fully backward compatible — no changes required for existing instances.

2026.08.02.1

2026.08.02.1

Changed: Bump @aws-sdk/* 3.1100.0 → 3.1101.0 (2 packages)

2026.08.01.1

Fixed: Broken model-upgrade chain. The prior version bump (to 2026.07.31.1) updated version but left the upgrades array terminating one step short, which blocks swamp extension push ("model upgrade chain errors"). That version never actually published — the registry was still serving 2026.07.30.1. This release closes the chain with a no-op upgrade entry and republishes everything that had accumulated since 2026.07.30.1.

2026.07.31.1

Changed: Bump @aws-sdk/* 3.1096.0 → 3.1100.0 (2 packages)

2026.07.30.1

Added: Optional profile global argument for multi-account credential resolution. When set, credentials resolve via fromIni (supports SSO token cache and shared-config profiles). When omitted, the default credential chain applies as before. Fully backward compatible — no changes required for existing instances.

2026.08.01.1

2026.08.01.1

Fixed: Broken model-upgrade chain. The prior version bump (to 2026.07.31.1) updated version but left the upgrades array terminating one step short, which blocks swamp extension push ("model upgrade chain errors"). That version never actually published — the registry was still serving 2026.07.30.1. This release closes the chain with a no-op upgrade entry and republishes everything that had accumulated since 2026.07.30.1.

2026.07.31.1

Changed: Bump @aws-sdk/* 3.1096.0 → 3.1100.0 (2 packages)

2026.07.30.1

Added: Optional profile global argument for multi-account credential resolution. When set, credentials resolve via fromIni (supports SSO token cache and shared-config profiles). When omitted, the default credential chain applies as before. Fully backward compatible — no changes required for existing instances.

2026.07.30.1

2026.07.30.1

Added: Optional profile global argument for multi-account credential resolution. When set, credentials resolve via fromIni (supports SSO token cache and shared-config profiles). When omitted, the default credential chain applies as before. Fully backward compatible — no changes required for existing instances.

2026.07.29.1

2026.07.29.1

Fixed: Terminate upgrade chain at current version (extension was uninstallable due to broken upgrade chain).

2026.07.27.1

Changed: Bump @aws-sdk/client-cost-explorer 3.1094.0 → 3.1096.0

2026.07.24.1

Changed: Bump AWS SDK from 3.1091.0 to 3.1094.0 (patch-level update).

2026.07.24.1

2026.07.24.1

Changed: Bump AWS SDK from 3.1091.0 to 3.1094.0 (patch-level update).

2026.07.21.1

2026.07.21.1

Changed: Bumped AWS SDK dependencies to 3.1091.0 (from 3.1090.0).

Upgrade note: No behavioral changes. Routine dependency maintenance.

2026.07.18.2

2026.07.18.2

Added: An upgrades array entry (no-op) to cost_explorer.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.18.1

Changed: Bumped @aws-sdk/client-cost-explorer from 3.1069.0 to 3.1090.0 for dependency freshness. No behavior change.

2026.07.18.1

2026.07.18.1

Changed: Bumped @aws-sdk/client-cost-explorer from 3.1069.0 to 3.1090.0 for dependency freshness. No behavior change.

2026.06.21.1
2026.06.15.1
2026.05.20.1
2026.04.22.1

updated platforms

2026.04.14.1

Modified 1 models

2026.04.13.1
2026.04.12.1
05Stats
A
100 / 100
Downloads
69
Archive size
248.9 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels