@webframp/aws/cost-explorer
v2026.04.14.1
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_driversRepository
https://github.com/webframp/swamp-extensions
Labels
Contents
Install
$ swamp extension pull @webframp/aws/cost-explorer| Argument | Type | Description |
|---|---|---|
| service | string | AWS service name to drill into |
Resources
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 ```bash 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 ```
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 ```bash 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 ```