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?

posta un anno fa283 visualizzazioni
1 Risposta
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
TECNICO DI SUPPORTO
con risposta un anno fa
  • Yes I was executing the API in the same region only. Will check for other parameter values as well. Thankyou.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande