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?

질문됨 일 년 전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
지원 엔지니어
답변함 일 년 전
  • Yes I was executing the API in the same region only. Will check for other parameter values as well. Thankyou.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠