"How can I determine why I was charged for CloudWatch usage, and then how can I reduce future charges?"
"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?"
"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 descriptionReview 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:MetricMonitorUsageCloudWatch metric API calls:API Name region-CW:RequestsGetMetricData region-CW:GMD-Requests/MetricsCloudWatch alarms:Unknown region-CW:AlarmMonitorUsageUnknown region-CW:HighResAlarmMonitorUsageCloudWatch dashboards: DashboardHour DashboardsUsageHour(-Basic)CloudWatch Logs:PutLogEvents region-DataProcessing-BytesPutLogEvents region-VendedLog-BytesHourlyStorageMetering region-TimedStorage-ByteHrsCloudWatch Contributor Insights:Contributor Insights Rules: region-CW:ContributorInsightRulesContributor Insights matched log events: region-CW:ContributorInsightEventsCloudWatch Synthetics canary runs: region-CW:Canary-runsWhen 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.ResolutionNote: 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 monitoringCharges 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 metricsCharges are incurred by monitoring more than ten custom metrics. Custom metrics include those that you created as well as those used by tools such as the CloudWatch agent and application or OS data from EC2 instances.Request metrics for Amazon Simple Storage Service (Amazon S3) and Amazon Simple Email Service (Amazon SES) events sent to CloudWatch incur charges.PutMetricData calls for a custom metric can also incur charges.Amazon Kinesis Data Streams enhanced (shard-level) metrics and AWS Elastic Beanstalk enhanced health reporting metrics sent to CloudWatch incur charges.To reduce costs, turn off monitoring of custom metrics, as 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 callsCharges 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 alarmsCharges 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 dashboardsCharges 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 LogsCharges 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 logsArchival 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 InsightsCharges are incurred 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 SyntheticsCharges are incurred when you exceed 100 canary runs per month using CloudWatch Synthetics.To reduce costs, delete any unnecessary canaries.Related informationAmazon CloudWatch pricingAWS services that publish CloudWatch metricsMonitoring metrics with Amazon CloudWatchHow can I determine why I was charged for EventBridge usage, and then how can I reduce future charges?Follow"