Guide to using AWS Cost Explorer to track, analyze, and forecast ML demo and development costs while optimizing spend with tagging, budgets, and resource cleanup
This guide shows how to use AWS Cost Explorer to track, analyze, and forecast costs generated by machine learning (ML) demos and development environments. Cost Explorer helps you identify which services, resources, or tags are driving spend so you can optimize usage, set budgets, and avoid surprises.Start from the AWS Management Console and open Cost Explorer. You can also link Cost Explorer to AWS Budgets to create alerts for thresholds and anomalies.For example, here’s a snapshot of the AWS Management Console showing cost and usage overviews:
Key capabilities you’ll use in Cost Explorer:
View actual (incurred) spend and modelled forecasted spend
Drill down by service, usage type, account, tag, and region
Create custom reports and set alerts with AWS Budgets
In many ML accounts the largest costs come from interactive runtimes, training instances, and endpoints. In this account, most spend is coming from Amazon SageMaker (Studio and related services).
Be careful with SageMaker resources: interactive runtimes, endpoints, and training instances can keep incurring charges if left running. Regularly stop or delete unused resources and verify you have no orphaned volumes, endpoints, or long-running training jobs.
Cloud resources created for demos are often forgotten. Regularly audit and terminate unused resources to prevent unexpected bills.
How to analyze costs with Cost Explorer
Open Cost Explorer and select a date range (last month, month-to-date, custom).
Group by dimension(s): Service, Usage Type, Region, Linked Account, or Tags.
Apply filters such as specific AWS Accounts, services (e.g., Amazon SageMaker), or tags (project/demo name).
In this example the report is grouped by Service so we can see which AWS services are contributing the most to monthly spend. SageMaker appears as the top service, followed by AWS Glue and others.
Dig deeper by expanding groups, switching visualization types (bar, area, line), and filtering by usage type or tags. Cost Explorer also produces forecasts based on historical trends and shows prediction intervals (e.g., an 80% prediction interval).
Useful Cost Explorer controls (quick reference)
Control
Purpose
When to use
Date range
Select timeframe to inspect costs
Monthly review, root-cause for a spike, or historical trend
Granularity
Monthly / Daily / Hourly
Use Hourly for short-lived resources, Daily for operational patterns
Group by / Dimension
Service, Usage Type, Region, Tag, Account
Identify which service or tag drives cost
Filters
Service, Linked Account, Tag, Region
Narrow the scope to specific projects or teams
Forecast
Projected future spend with prediction intervals
Budget planning and capacity forecasting
Actionable checklist for ML teams
Tag resources: apply project, environment, or owner tags to SageMaker notebooks, endpoints, training jobs, and datasets.
Schedule and automate shutdowns: stop interactive runtimes and non-production endpoints when idle.
Review Cost Explorer weekly: identify anomalies or growth trends early.
Create budgets and alerts using AWS Budgets to trigger notifications before thresholds are breached.
Clean up orphaned storage or snapshots that can accumulate costs.
Tip: Tag SageMaker resources (notebooks, endpoints, training jobs) with project or demo identifiers so Cost Explorer can group and attribute costs accurately by project, team, or environment.