DEV Community

Cover image for How to display AWS billing metrics in Grafana Cloud
Johannes Konings for AWS Community Builders

Posted on β€’ Edited on β€’ Originally published at johanneskonings.dev

3 2

How to display AWS billing metrics in Grafana Cloud

Why Grafana for AWS billing metrics?

Grafana is well known for observability dashboards, which can be composed of many data sources.
With AWS CloudWatch metrics, it is possible to do more or less the same, but it is designed more for one account and more for the AWS metrics.
In Grafana, it's easy to use different data sources so that you can have your billing metrics on the same dashboard as your other technical and business metrics from elsewhere.

Configuration of the Grafana Cloud instance

Here https://grafana.com/products/cloud/ you can sign up for a Grafana Cloud account.

It's free for this use case (and many more :))

Grafana Cloud pricing

After login, create a stack with the starter plan.

Grafana Cloud add stack

Grafana Cloud starter plan

Then log in to your instance.

Grafana Cloud instance login

Creation of an IAM user for the CloudWatch data source

The CloudWatch data source needs an access key and a secret key. Therefore is an IAM user needed. As policy can be this used:

https://grafana.com/docs/grafana/latest/datasources/cloudwatch/#iam-policies

Configuration of the CloudWatch Datasource

The next step is to add the CloudWatch data source to your Grafana cloud instance.

Grafana Cloud add datasource

Grafana Cloud select cloudwatch datasource

As for credentials, use the access key and secret key from the IAM user.

Grafana Cloud configuration cloudwatch datasource

Creation of a dashboard with a graph panel

Now you can use the data source in the panels of a dashboard.

Grafana Cloud create dashboard

Grafana Cloud add panel

This is a panel configuration example for the costs of all linked accounts.

Grafana Cloud accounts panel

This should be considered:

  1. If the CloudWatch data source is not the default one, switch to the CloudWatch data source.
  2. Billing metrics are all in the region us-east-1
  3. The time frame "this month" seems the right choice for the monthly costs :)

And ready to go πŸŽ‰

Grafana Cloud created dashboard

Usage of a prepared dashboard

Here https://grafana.com/grafana/dashboards is a big list of official and community dashboards you can import to Grafana.

You can import a URL or ID from the list or, e.g., this https://grafana.com/grafana/dashboards/13446 Dashboard in that way.

Grafana Cloud import dashboard

The selection of the data source is required.

Grafana Cloud import dashboard2

And ready to go πŸŽ‰

Grafana Cloud imported dashboard

more dashboards

Monitoring Artist has many more cloud watch dashboards: https://grafana.com/orgs/monitoringartist

πŸ‘‹ While you are here

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay