How can I determine why I was charged for CloudWatch usage, and then how can I reduce future charges?

6 minute read
1

I see high Amazon CloudWatch charges in my AWS bill. I want to understand my CloudWatch usage and reduce future charges.

Short description

To understand your CloudWatch charges, review your AWS Cost and Usage reports. Look for charges for the following services.

Note: Items in bold are similar to what you might see in your reports. Region represents the abbreviation for your AWS Regions.

  • Custom metrics: MetricStorage region-CW:MetricMonitorUsage
  • CloudWatch metrics API calls:
    API Name region-CW:Requests
    GetMetricData region-CW:GMD-Requests/Metrics
  • CloudWatch alarms:
    Unknown region-CW:AlarmMonitorUsage
    Unknown region-CW:HighResAlarmMonitorUsage
  • CloudWatch dashboards: DashboardHour DashboardsUsageHour(-Basic)
  • CloudWatch Logs:
    PutLogEvents region-DataProcessing-Bytes
    PutLogEvents region-VendedLog-Bytes
    HourlyStorageMetering region-TimedStorage-ByteHrs
  • CloudWatch Contributor Insights:
    Contributor Insights Rules: region-CW:ContributorInsightRules
    Contributor Insights matched log events: region-CW:ContributorInsightEvents
  • CloudWatch Synthetics canary runs: region-CW:Canary-runs

When you understand your charges, use the following best practices to reduce future costs.

To easily monitor your AWS costs in the future, turn on billing alerts.

Resolution

Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you're using the most recent AWS CLI version.

Detailed monitoring

Detailed CloudWatch monitoring incurs charges for Amazon Elastic Compute Cloud (Amazon EC2) instances, Auto Scaling group launch configurations, or API gateways.

To reduce costs, turn off detailed monitoring of instances, Auto Scaling group launch configurations, or API gateways.

Custom metrics

You incur charges when you monitor more than ten custom metrics. Custom metrics include those that you created. They also include the metrics that are used by tools such as the CloudWatch agent and application or OS data from EC2 instances. To reduce costs from custom metrics, be aware of how they might incur charges based on your use case:

To avoid unnecessary charges, turn off monitoring of custom metrics when appropriate. To show custom metrics only, enter NOT AWS in Search for any metric, dimension or resource ID box of the CloudWatch console.

CloudWatch metric API calls

Charges vary by CloudWatch metric API. API calls that exceed the AWS Free Tier limit incur charges. GetMetricData and GetMetricWidgetImage don't count in the AWS Free Tier. Because third-party monitoring tools perform frequent API calls, they might increase your costs.

To reduce costs, implement the following best practices:

  • Instead of making ListMetrics calls through the AWS CLI, make them through the console for free.
  • Batch multiple PutMetricData requests into one API call. Also, pre-aggregate metric data into a StatisticSet. This reduces the API call volume and corresponding charges.
  • If you have a third-party monitoring tool, then retrieve only the metrics that you're actively monitoring or using in workloads. You can also use metric streams as an alternative solution, and then evaluate which deployment is the most cost effective. Be sure to review the costs that third-party monitoring tools incur.

For more information, see Should I use GetMetricData or GetMetricStatistics for CloudWatch metrics?

If you see API calls that incur charges on your bill, but you need more information on associated resources, then contact AWS Support.

CloudWatch alarms

The number of metrics that are associated with a CloudWatch alarm can incur costs. For example, if you have a single alarm with multiple metrics, you're charged for each metric. To reduce costs, remove unnecessary alarms.

CloudWatch dashboards

You incur charges with CloudWatch dashboards in the following scenarios:

  • You exceed the limit of three dashboards, with up to 50 metrics per dashboard.
  • You make calls to dashboard-related APIs through the AWS CLI or an SDK that exceed the AWS Free Tier limit.
  • The Exception: GetMetricWidgetImage API always incurs charges.

To reduce costs, delete unnecessary dashboards. If you're using the AWS Free Tier, then limit your total number of dashboards to three or less. Also, instead of making dashboard-related API calls through the AWS CLI or an SDK, make them through the console for free.

CloudWatch Logs

Amazon CloudWatch logs incur charges by ingestion, archival storage, and analysis.

Ingestion

Ingestion charges reflect the volume of log data that CloudWatch Logs service ingests. The CloudWatch metric IncomingBytes reports on the volume of log data processed by the service. To monitor the volume of logs that various workloads generate, visualize this metric in a CloudWatch graph or dashboard. If high ingestion charges occur, then follow the guidance in Which Log Group is causing a sudden increase in my CloudWatch Logs bill?

To reduce ingestion costs, evaluate logging levels and eliminate the ingestion of unnecessary logs.

Archival

Archival charges are related to the log storage costs over time. The retention policy determines how long CloudWatch Logs keeps the data. You can create a retention policy directing so that CloudWatch automatically deletes data older than the set retention period. This limits the data retained over time.

The default retention policy on log groups is set to Never Expire. This setting means that CloudWatch retains data indefinitely. To reduce storage costs, change the retention policy for how long you want CloudWatch to retain the data.

Analysis

Analysis charges occur when you use Log Insights to query logs. The charge is based on the volume of data that's scanned to provide query results. The Log Insights console provides a history of previously run queries. To reduce analysis charges, review the Log Insights query history and set queries to run over shorter timeframes. This reduces the amount of data that's scanned.

CloudWatch Contributor Insights

You incur charges when you exceed one Contributor Insights rule per month, or more than 1 million log events match the rule per month.

To reduce costs, view your Contributor Insights reports and remove any unnecessary rules.

CloudWatch Synthetics

CloudWatch Synthetics incurs charges when you exceed 100 canary runs per month. To reduce costs, delete any unnecessary canaries.

Related information

Amazon CloudWatch pricing

AWS services that publish CloudWatch metrics

Monitoring metrics with Amazon CloudWatch

How can I determine why I was charged for EventBridge usage, and then how can I reduce future charges?

AWS OFFICIAL
AWS OFFICIALUpdated 5 months ago
1 Comment

For the last few months we've been seeing CW:GMD-Metrics in our costs. We also have USW1-CW:GMD-Metrics (which is - as described above - regional).

Neither of these have resource IDs next to them.

How can I determine which resources are causing these charges?

replied 6 months ago