aws_ce_get_cost_and_usage
Retrieve AWS cost and usage data for specified time periods. Group results by service, account, region, or tags to analyze spending patterns and optimize cloud expenses.
Instructions
Get cost and usage data for a time period. Group by service, account, region, tag, etc. TimePeriod format: {'Start': 'YYYY-MM-DD', 'End': 'YYYY-MM-DD'}.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profile | No | AWS profile name from ~/.aws/config (e.g., 'default', 'production') | |
| region | No | AWS region override (e.g., 'us-east-1', 'sa-east-1') | |
| time_period | Yes | Time period for the cost query | |
| granularity | No | Time granularity (default: MONTHLY) | |
| metrics | No | Metrics to return (default: ['UnblendedCost']). Options: UnblendedCost, BlendedCost, AmortizedCost, UsageQuantity | |
| group_by | No | Group results by dimension (e.g., [{"Type": "DIMENSION", "Key": "SERVICE"}]) | |
| filter | No | Cost Explorer filter expression |