CmdID

CmdID / Commands

aws-ce

Run cost management operations through the AWS Cost Explorer service. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Create anomaly monitor

aws ce create-anomaly-monitor --monitor monitor_name --monitor-type monitor_typeIdentify

Create anomaly subscription

aws ce create-anomaly-subscription --subscription subscription_name --monitor-arn monitor_arn --subscribers subscribersIdentify

Get anomalies

aws ce get-anomalies --monitor-arn monitor_arn --start-time start_time --end-time end_timeIdentify
--monitor-arnRetrieves all of the cost anomalies detected for a specific cost anomaly monitor Amazon Resource Name (ARN). AWS CLI reference

Get cost and usage

aws ce get-cost-and-usage --time-period start_date/end_date --granularity granularity --metrics metricsIdentify
--time-periodSets the start date and end date for retrieving Amazon Web Services costs. AWS CLI reference
--granularitySets the Amazon Web Services cost granularity to MONTHLY or DAILY, or HOURLY. AWS CLI reference
--metricsWhich metrics are returned in the query. AWS CLI reference

Get cost forecast

aws ce get-cost-forecast --time-period start_date/end_date --granularity granularity --metric metricIdentify
--time-periodThe period of time that you want the forecast to cover. AWS CLI reference
--granularityHow granular you want the forecast to be. AWS CLI reference
--metricWhich metric Cost Explorer uses to create your forecast. AWS CLI reference

Get reservation utilization

aws ce get-reservation-utilization --time-period start_date/end_date --granularity granularityIdentify
--time-periodSets the start and end dates for retrieving Reserved Instance (RI) utilization. AWS CLI reference
--granularityIf GroupBy is set, Granularity can't be set. AWS CLI reference

List cost category definitions

aws ce list-cost-category-definitionsIdentify

Tag resource

aws ce tag-resource --resource-arn resource_arn --tags tagsIdentify
--resource-arnThe Amazon Resource Name (ARN) of the resource. AWS CLI reference