Create a Dashboard

Create a dashboard using AWS Console

  1. In the AWS Management Console on the Services menu, click CloudWatch.
  2. In the left navigation menu, click on Dashboards.
  3. Click Create Dashboard.
  4. Name the dashboad observability-dashboard and click Create dashboard.

You will see a screen such as the one below where you can choose the type of widget you want.


  1. Select Line graph followed by Metrics, then click Configure.

This will take you a screen showing all Namespaces under which Metrics are being collected.

  1. Select ContainerInsights namespace.
  2. Select the ClusterName, Namespace, PodName dimension.


  1. Select a metric with the Metric Name pod_cpu_utilization by checking the checkbox in the row of the metric.


  1. Click the Create widgetbutton in the bottom right corner.

This will add the graph of the metric as a new widget to the dashboard.

You can adjust the size of the widget by dragging the bottom right of the corner.

  1. Click on Save dashboard to save the dashboard.

Learn about Service Quota limits on widgets and metric limits per widget/dashboard here.

You can also add CloudWatch Logs Insights results as a widget as well.

  1. Click on Add widget in the top right corner.
  2. Select Line graph followed by Logs.

This which will take you to CloudWatch Logs Insights screen.


  1. Select the /aws/containerinsights/PetSite/application log group from the drop down.
  2. Paste and run the query below in the query textbox, then click run Run query.
fields @timestamp, @message
| sort @timestamp desc
| filter @message like /PetListAdoptions/
| stats count(@message) by bin(5m)
| limit 20

Your screen should look similar to the one below.

The query shows the number of instances the string PetListAdoptions was found in the log data.


  1. Click Create widget.

This will add a new widget to the dashboard as shown below.


Working on CloudWatch dashboards using AWS CLI

You can perform a variety of operations on CloudWatch Dashboards through AWS CLI as well.

Take a look at the available commands here.

  1. Execute the following command in the terminal:

This command gets the dashboard in json format back to you.

aws cloudwatch get-dashboard --dashboard-name observability-dashboard

Setup Cloud9 in case you did not do that already

Create a new dashboard

  1. Save the following json string below into a file on your local directory named dashboard.json.
  2. Replace <YOUR_AWS_REGION_HERE> in the file below with your currently selected region and save.
  1. Execute the following command in the terminal:

This will create a new CloudWatch Dashboard

aws cloudwatch put-dashboard --dashboard-name cli-dashboard --dashboard-body $(cat dashboard.json)
  1. Execute the following command in the terminal:

This will return a list of dashboards that exist on the account.

aws cloudwatch list-dashboards

You can also check your newly created dashboard on the CloudWatch Dashboard console as well.

This concludes this section. You may continue on to the next section.