Using DataDog API to pull metrics data for EC2 instances

In this short post, we’ll see how we can use Datadog API to pull instance utilization data.

Pre-requisite: DataDog must be setup, with your EC2 instances metric data being available in DataDog. You will also need DataDog API key and Application key

Step 1: Install datadog package using pip.

Step 2: Save the given code on your local system.

import requests, json,sys
from datadog import initialize, api
from time import time…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store