How do I reduce and prevent unnecessary charges in CloudWatch?

5 minute read

I want to reduce and prevent unnecessary charges that I incur in Amazon CloudWatch.

Short description

To identify your CloudWatch usage charges, review your AWS Cost and Usage Reports. To reduce and prevent unnecessary charges, review the following CloudWatch services, and implement cost-effective methods:

  • CloudWatch custom metrics
  • CloudWatch metric API calls
  • CloudWatch alarms
  • CloudWatch dashboards
  • CloudWatch Logs
  • CloudWatch Contributor Insights
  • CloudWatch Synthetics
  • CloudWatch Internet Monitor
  • CloudWatch Container Insights
  • CloudWatch Application Signals
  • CloudWatch RUM
  • CloudWatch Evidently

Note: To monitor future AWS costs, it's a best practice to turn on billing alerts.


CloudWatch custom metrics

All CloudWatch detailed monitoring and custom metrics are prorated by the hour and metered when metrics are sent to CloudWatch.

To reduce CloudWatch metrics charges, take the following actions:

  • Turn off detailed monitoring for instances, Auto Scaling group launch configurations, and API gateways.
  • Turn off monitoring for custom metrics when appropriate. Metrics requests for Amazon Simple Storage Service (Amazon S3) and Amazon Simple Email Service (Amazon SES) events are sent to CloudWatch and incur charges. The unified CloudWatch agent uses the PutMetricData API call to publish. When you call PutMetricData for custom metrics, you incur charges. Also, Amazon Kinesis Data Streams enhanced shard-level metrics and AWS Elastic Beanstalk enhanced health reporting metrics are sent to CloudWatch and incur charges.

Note: To show only custom metrics, enter NOT AWS in the Search for any metric, dimension or resource ID box of the CloudWatch console.

CloudWatch metric API calls

Charges vary for each CloudWatch metric API. API calls that exceed the AWS Free Tier limit incur charges. Metrics that third-party monitoring tools make, such as GetMetricData and GetMetricWidgetImage, don't count in the AWS Free Tier. For more information, see Should I use GetMetricData or GetMetricStatistics for CloudWatch metrics?

To reduce charges from CloudWatch API calls and third-party monitoring tools, use the following best practices:

  • Make ListMetrics calls through the AWS Management Console for free, instead of through the AWS Command Line Interface (AWS CLI).
  • To reduce the API volume call and associated charges, batch multiple PutMetricData requests into one API call and pre-aggregate metric data into a StatisticSet.
  • For third-party monitoring tools, retrieve only the metrics that you're monitoring or that are used in workloads. You can also use metric streams to determine the deployment that's more cost effective. Make sure that you review the costs that your third-party monitoring tools incur.

CloudWatch alarms

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

For more information, see Automating Amazon CloudWatch alarm cleanup at scale.

CloudWatch dashboards

Charges for CloudWatch dashboard usage occur in the following situations:

  • You exceed the AWS Free Tier limit of three dashboards with a maximum of 50 metrics for each dashboard.
  • You make calls to the dashboard APIs GetDashboard, ListDashboards, PutDashboard, and DeleteDashboards that exceed the AWS Free Tier limit.
  • You use the Exception: GetMetricWidgetImage API.

To reduce charges, take the following actions:

  • Delete unnecessary dashboards.
  • If you're using AWS Free Tier, then limit your total number of dashboards to three.
  • Make dashboard API calls through the AWS Management Console.

CloudWatch Logs

Amazon CloudWatch logs incur charges from ingestion, archival storage, and analysis. To reduce charges, take the following actions:

  • Ingestion: To monitor the volume of logs that workloads generate, view this metric in a CloudWatch graph or dashboard. For high ingestion charges, see Which Log Group is causing a sudden increase in my CloudWatch Logs bill? To reduce ingestion charges, check logging levels and remove unnecessary log ingestion. Also, it's a best practice to use infrequent access logs to cost-effectively store your logs.
  • Archival: The retention policy determines how long CloudWatch Logs maintains data. To reduce archival charges, modify the retention policy to a shorter retention period to limit data that are stored over time.
  • Analysis: Analysis charges occur when you use Log Insights to query logs or Live Tail to analyze your logs in real time. To reduce the charges that Logs Insights incurs, set your queries to run with shorter timeframes so that less data is scanned. To reduce the charges that Live Tail incurs, minimize your session usage time.

CloudWatch Contributor Insights

When you exceed one Contributor Insights rule each month or more than one million log events match the rule each month, you incur charges. To reduce charges, view your Contributor Insights reports and remove unnecessary rules.

CloudWatch Synthetics

CloudWatch Synthetics incurs charges when you exceed 100 canary runs each month. For each canary run, you might incur additional charges for other AWS services that you use, such as AWS Lambda, Amazon S3, CloudWatch Logs, and CloudWatch metrics. To reduce charges, remove unnecessary canaries.

CloudWatch Internet Monitor

CloudWatch Internet Monitor incurs charges for each monitored resource and all city networks. You might also incur additional charges for diagnostic logs that you publish to CloudWatch Logs. To reduce charges, set a limit for the maximum number of city networks that you monitor.

Container Insights

Container Insights incurs charges based on the metrics that are collected and the log data that's ingested. If you use enhanced observability for Amazon Elastic Kubernetes Service (Amazon EKS), then Container Insights metrics and logs are charged for each observation. To reduce charges, turn off enhanced observability on your Amazon Elastic Container Service (Amazon ECS) or Amazon EKS clusters.

Related information

CloudWatch billing and cost

AWS OFFICIALUpdated 4 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 a year ago