2
votes

I have a lambda, that runs really rarely, calculates a value and publishes it as a metric. The last value is the only relevant one. I want to show this value on a CloudWatch dashboard with a number widget, but depending on what period I view (the top right corner), it shows "--" when the metric havent been published recently enough.

Any ideas how I can make it show all the time?

I was thinking maybe a log query instead of a metric - but I am not sure what the pricing model for those is.

1

1 Answers

0
votes

the number widget is basically a metric widget with a view "singleValue" which is the value of the most recent datapoint for the time range given the query. What is the time range you are querying at the moment?

I would expand your time range of your query to a reasonable value (last xx hours or months, up to 455 days which is the current maximum retention limit) - see the GMD documentation.