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年前283ビュー
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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ