DEV Community

Walid BATTOU
Walid BATTOU

Posted on • Updated on

CloudWatch Logs Pricing - FinOps

I would like to share graphical content about some FinOps topics and what you need to know about AWS Bills. I am starting with a CloudWatch log animation, let me know if you are interested in this content.

You will find some explanations about my recommendations below.

Configure retention policy on your log groups.

You can directly configure your log group retention policy on your CloudWatch agent configuration file.

Concerning the archiving of your oldest logs, for the moment, you can periodically copy them to s3 but not schedule the copy.

Avoid selecting a long period of time when using Logs Insights queries.

You can use CloudWatch Logs Insights to do some queries and build some dashboards based on them. On dashboards or queries, do not select a large period of time when you have a lot of data in your log groups.

Think about using throttling/WAF on your internet facing workloads to avoid a high log volume ingestion.

For this recommendation, we can take API gateway for example.
Suppose that your company can’t have the time to invest on security for the moment, there aren’t any WAF rules or throttling in place.

What happens if your API Gateway gets attacked and logging is enable on it ?
The result will be a high volume of log. The most expensive part is logs ingestion (cf:animation below). In the cloud, other than causing some performance troubles, an attack will lead to an additional cost on logs and metrics.

Image description

Top comments (0)