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?

已提問 1 年前檢視次數 284 次
1 個回答
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
支援工程師
已回答 1 年前
  • Yes I was executing the API in the same region only. Will check for other parameter values as well. Thankyou.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南