Is CloudWatch Really Cost Efficient?

cloudwatch cost

One of the keys to CloudWatch’s success is its no bang, no buck billing system. The pricing structure has been designed from the outset to ensure that CloudWatch users only pay for what they actually use. In addition, the CloudWatch Free Tier allows first time users to test the waters without shelling out.

The downside of this flexibility and adaptability is complexity. In order to cost CloudWatch usage fairly and accurately the pricing structure needs to separately track the utilization of a diverse range of system tools and components.

Because developers in a business environment can’t always keep tabs on, say, the precise amount of logging data they collect, customers who aren’t accustomed to CloudWatch can find themselves in the position of a tourist who raided their hotel minibar and is now being billed by said hotel.

The following article will explain how CloudWatch billing breaks down, and hopefully give you a clear idea of what you can expect your monthly bill to be.

Dashboards

Dashboards are the simplest feature to cost. CloudWatch allows you to create three Dashboards with 50 metrics for no charge, beyond that each Dashboard you create costs $3 per month. In comparison, Coralogix charges nothing extra for dashboards and includes this as part of your processing costs.

Logging

AWS logging has three stages called Collect, Store and Analyse. Collect involves the actual logging of events in a process called data ingestion. Store involves archiving log data for future use. Analyse is the process of running queries to extract data and insights from the log.

CloudWatch’s Free Tier allows you to process 5GB of logging data for no charge. Beyond this, AWS charges you a small amount to perform Collect, Analyse and Store stages. Data ingestion in the Collect stage costs $0.50 per GB. Running queries in the Analyze stage costs $0.03 per GB. Archiving logs in the Store is billed at $0.005 per GB. 

A good cost estimate for CloudWatch logs can be arrived at by adding these three costs together and multiplying by the amount of logging data you want to process. Here’s a simple table to show monthly logging costs to process 100, 200 and 300GBs of data.

Log Volume (GB/Month)CloudWatch Price ($)
10080.50
200161.00
300241.50

Vended Logs

Vended logs, such as Amazon VPC flow logs, are published natively by AWS services. Vended logs may potentially save you money because they are available at volume discounts. While they have a number of different delivery outlets such as S3 and Kinesis, this article will focus on CloudWatch logs. The total cost per GB for CloudWatch logs delivery consists of two parts, data ingestion – which involves collecting raw performance data for logs, and data storage – storing the logs in CloudWatch for later viewing. Data ingestion is $0.50 per GB and data storage costs an extra $0.03 per GB. In total, this means vended logging has a cost per GB of $0.53.

The following table gives an estimate of the monthly logging costs for 100, 200 and 300GBs of data.

Log Volume (GB)Delivery to CloudWatch Logs data ingestion + storage price($)
10053
200106
300159

Metrics

Metrics are one of CloudWatch’s most powerful tools. The ability to perform statistical analysis of metric data coupled with the ability to create custom metrics allows you to monitor system performance from lots of different angles.

CloudWatch allows you to have 50 metrics per Dashboard free of charge. Beyond that, there is a small monthly charge for each additional metric you have. Above the first 10,000 metrics the monthly cost is tiered. Below is a table showing these tiers.

TiersMonthly Cost per Metric ($)CloudWatch Total Monthly Cost ($)
First 10,000 metrics0.303,000
Next 240,000 metrics0.1024,000
Next 750,000 metrics0.0537,500
Over 1,000,000 metrics0.0220,000+

Coralogix does not charge extra for metrics. The logs2metrics feature is bundled in with your fees when you initially process the data. Moreover, you can categorise your less “valuable” data and pay even less for it

In addition to the cost of custom metrics, you also need to think about the cost of performing API requests. You can make an API request with get-metric-data with up to five statistics per metric. If you request any more, it’s billed as if you created an additional metric. Here is a table showing costs for a range of API request commands.

API CommandCost per 1,000 Metrics Requested ($)
GetMetricData0.01
GetInsightRuleReport0.01
GetMetricWidgetImage0.02
GetMetricStatistics0.01
ListMetrics0.01
PutMetricData0.01
GetDashboard0.01
ListDashboards0.01
PutDashboard 0.01
DeleteDashboards requests0.01

Billing in the Wild

To give an idea of how the above costs scale in an enterprise application, let’s do some calculations. Suppose you have an application with 200 instances and each instance has 10 custom metrics. AWS estimates that each EC2 Instance contains on average 7 metrics. In addition, applications are producing 10GB of logs per day.

To calculate the monthly cost if this application runs 24×7, we first need to ascertain the total number of metrics. Since there are 200 instances with 10 metrics per instance, there are 2000 metrics in total. Now we need to account for the tiered pricing structure shown in the previous table. 

It’s helpful to visualise our 2,000 metrics as a tower with the first 10,000 metrics at the base. By looking at our table we can see our 2,000 metrics are priced according to the bottom tier, each metric costing 30 cents per month. The total cost is $600. 

Second is the simple cost of log retention. At 10GB per day, we’re producing 300GB of logs per month. We will use our previously declared cost of $241.

Now let’s calculate the cost of API requests. If we assume we’re dealing with a 30 day month and each instance makes one request every 5 minutes, our application makes 1,728,000 requests per month. Now we need to use the same trick we did with custom metrics, visualising the total API request number as a banded tower. At the base, the first 1,000,000 API requests don’t cost anything. 1,728,000/1,000 * $0.01 = $17.28

The total CloudWatch costs for our application run to $859.28 per month. 

Cloudwatch bills in several constituent parts and each of those components sum to a hefty bill. In contrast, Coralogix gives you one simple monthly cost.

Final Thoughts

CloudWatch’s billing system has a reputation for being complex and difficult to understand. The complex, tiered system makes it tricky to work out how much you’ll be paying at the end of the month. Rather than doing your own accounting, simplify your bills and save up to 70% on your logging costs, with Coralogix.

Start solving your production issues faster

Let's talk about how Coralogix can help you

Managed, scaled, and compliant monitoring, built for CI/CD

Get a demo

No credit card required

© 2021 Copyright Coralogix. All rights reserved.

Get a personalized demo

Jump on a call with one of our experts and get a live personalized demonstration