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

Last updated: 2022-08-05

I'm seeing high Amazon CloudWatch charges in my AWS bill. How can I see why I was charged for CloudWatch usage, and then how can I reduce future charges?

Short description

Review your AWS Cost and Usage reports to understand your CloudWatch charges. Look for charges for the following services.
Note: Items in bold are similar to what you might see in your reports. In your reports, region represents the abbreviation for your AWS Regions.

Custom metrics: MetricStorage region-CW:MetricMonitorUsage

CloudWatch metric 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 what you were charged for and why, use the following recommendations to reduce future costs by adjusting your CloudWatch configuration.

To easily monitor your AWS costs in the future, enable 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

  • Charges are incurred by detailed CloudWatch monitoring 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, as appropriate.

Custom metrics

CloudWatch metric API calls

  • Charges vary by CloudWatch metric API. API calls that exceed the AWS Free Tier limit incur charges. GetMetricData and GetMetricWidgetImage aren't counted in the AWS Free Tier.
  • Third-party monitoring tools can increase costs because they perform frequent API calls.
  • To reduce costs:
    Make ListMetrics calls through the console for free rather than making them through the AWS CLI.
    Batch multiple PutMetricData requests into one API call. Also consider pre-aggregating metric data into a StatisticSet. Using these best practices reduces the API call volume and corresponding charges are reduced.
    In use cases involving a third-party monitoring tool, make sure that you are retrieving only metrics that are actively being monitored or that are being used by workloads. Reducing the retrieved metrics reduces the amount charged. You can also consider using metric streams as an alternative solution, and then evaluate which deployment is the most cost effective.
    or more information, see Should I use GetMetricData or GetMetricStatistics for CloudWatch metrics? Also be sure to review costs incurred by third-party monitoring tools.

CloudWatch alarms

  • Charges are incurred by the number of metrics associated with a CloudWatch alarm. 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

  • Charges are incurred when you exceed three dashboards (with up to 50 metrics).
  • Calls to dashboard-related APIs through the AWS CLI or an SDK also incur charges after requests exceed the AWS Free Tier limit.
    Exception: GetMetricWidgetImage always incurs charges.
  • To reduce costs, delete unnecessary dashboards. If you're using the AWS Free Tier, keep your total number of dashboards to three or less. Also be sure to keep the total number of metrics across all dashboards to less than 50. Make dashboard-related API calls through the console for free rather than making them through the AWS CLI or an SDK.

CloudWatch Logs

  • Charges are incurred by ingestion, archival storage, and analysis of Amazon CloudWatch Logs.
  • Ingestion charges reflect the volume of log data ingested by the CloudWatch Logs service. The CloudWatch metric IncomingBytes reports on the volume of log data processed by the service. By visualizing this metric in a CloudWatch graph or dashboard, you can monitor the volume of logs generated by various workloads. If high CloudWatch Logs ingestion charges occur, follow the guidance in Which Log Group is causing a sudden increase in my CloudWatch Logs bill?
  • To reduce ingestion costs, you can re-evaluate logging levels and eliminate the ingestion of unnecessary logs
  • 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, consider changing the retention policy (for example, you can set the retention policy to keep data for 1 week, 1 month, and so on).
  • Analysis charges occur when Log Insights is used to query logs. The charge is based on the volume of data scanned in order to provide query results. The Log Insights console provides a history of previously run queries. To reduce analysis charges, you can review the Log Insights query history and set queries to run over shorter timeframes. This reduces the amount of data scanned.

CloudWatch Contributor Insights

CloudWatch Synthetics