I am getting null response for the CloudWatch Metrics API (ListMetrics, GetMetricData, GetDashboard) while executing the API from Lambda function (Python) and Postman also.

0

I was following this document, https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-network-analyzer-request-sample.html Able to generate the signature but when trying to execute any CloudWatch metric api I am getting 200 as response code and null response even though the metric and dashboard data is there. Is there any other way to get the metric data from cloudwatch or any other more detailed document which can be referred for API execution?

  • Can you post your boto3 snippet?

asked a year ago274 views
1 Answer
0

If getting a null response, please ensure you are calling the CloudWatch APIs in the correct region in which the metrics and dashboards exist. As well, ListMetrics should return a list of available metrics without needing to specify any specific parameters, but GetMetricData and GetDashboard will return null results if incorrect parameters such as metric dimension values, metric name, or dashboard name are not passed correctly.

As well, for further details, you can find the following documentation for a CloudWatch boto3 example, and the full CloudWatch boto3 documentation below:

Getting metrics from Amazon CloudWatch

CloudWatch Boto3 documentation

AWS
SUPPORT ENGINEER
answered a year ago
  • Yes I was executing the API in the same region only. Will check for other parameter values as well. Thankyou.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions