Building CloudWatch Dashboards with IaC

Eden Hare
14 min readJan 19, 2022

I am a Sr. DevOps Consultant in Amazon Web Services Professional Services division. This article is my own work using publicly available information and does not necessarily reflect the opinions of my employer.

Amazon CloudWatch (hereafter referred to as CloudWatch) collects log and metric data from EC2 instances and other AWS services. CloudWatch includes a dashboard feature for viewing metrics and alarms to create notifications and perform actions when breaching an alarm threshold or when the alarm condition resets. CloudWatch is the AWS-provided observability platform.

CloudWatch dashboards are great for viewing the state of the environment in the console. Repeatedly designing a dashboard can be problematic as the console interface uses a “drag and drop” approach to designing the dashboard. It is hard to duplicate them in this manner.

We can use Infrastructure as Code (IaC) to define our dashboards. This article looks at why using CloudWatch Dashboards is beneficial, how to build one in the console, and finally, how to build a dashboard using IaC.

Why Use CloudWatch?

Applications and Infrastructure require a monitoring platform to understand the performance of those infrastructure resources and applications. There are many different observability platforms…

--

--

Eden Hare

Eden is the co-author of seven books and author of more than 100 articles and book chapters in technical, management, and information security publications.