Using the Cloudwatch SDK

Get familiar with the cloudwatch SDK to retrieve metric statistics about our application.

Retrieving the metric information

The most important call for our project will be getMetricStatistics from the AWS Node SDK, which “gets statistics for the specified metric,” according to AWS documentation. Given the right parameters, we can retrieve our three relevant metrics for a function using this call. Let’s start by writing one big function for retrieving the metric information.

Get hands-on with 1200+ tech skills courses.