Skip to content
Cost Analytics

Cost Analytics

AWS Doctor focuses on contextual cost analysis. Instead of just showing raw numbers, it helps you understand how your spending is evolving.

Comparative Workflow

To get a side-by-side comparison of your spending, use the cost subcommand:

aws-doctor cost

This triggers the Comparative Workflow, which includes a per-service breakdown (EC2, S3, etc.) to help you identify specific cost drivers.

Comparative Cost Analytics

Fairness in Comparison

Traditional billing comparisons (like Month-over-Month) are often misleading. Comparing the 15th of October to the full month of September will always look like a “saving,” even if you are spending more.

AWS Doctor solves this by comparing identical time windows:

  • Current Period: 1st day of the month → Today.
  • Previous Period: 1st day of the previous month → Identical day last month.

Example: If today is Oct 15th, it compares Oct 1-15 vs Sept 1-15.

1st Day of the Month: This feature is not available on the first day of the month. AWS Cost Explorer requires a minimum 24-hour range where the start date is strictly before the end date.

6-Month Trend Analysis

To spot long-term growth patterns or sudden architectural shifts, use the trend subcommand:

aws-doctor trend

6-Month Trend Analysis

Filtering by Service

You can now focus your trend analysis on specific AWS services by passing them as arguments to the trend subcommand. This is useful for monitoring the cost evolution of a single service or a group of services.

# Analyze cost trend for EC2 and S3 only
aws-doctor trend ec2 s3

You can pass multiple services separated by spaces or commas.

Available Service Shorthands

AWS Doctor uses intuitive shorthands for filtering. Each shorthand maps to its official AWS Cost Explorer service name:

ShorthandAWS ServiceShorthandAWS Service
ec2EC2 Computes3S3 Storage
rdsRDS DatabaselambdaAWS Lambda
dynamodbDynamoDBeksEKS (Kubernetes)
ecsECS (Containers)elbElastic Load Balancing
vpcVirtual Private Cloudroute53Route 53
apigatewayAPI GatewaycloudfrontCloudFront
cloudwatchCloudWatchelasticacheElastiCache
redshiftRedshiftsavingsplansSavings Plans
glueAWS GluekinesisKinesis
firehoseKinesis FirehosequicksightQuickSight
wafAWS WAFbackupAWS Backup
stepfunctionsStep FunctionskmsKMS
secretsmanagerSecrets ManagerssmSystems Manager
locationLocation ServiceecrECR (Registry)

What it shows:

  • A high-fidelity ANSI bar chart in your terminal.
  • Monthly total costs for the last 6 completed billing cycles.
  • Clear indicators of whether your spend is accelerating or stabilizing.