I'm trying to get the last record of x variable in a dynamoDB table using php. The simple way I had was to get the data for the last 10 minutes and those get the first.
//Ruta de la variable que se quiere obtener
$nameVariable = $this->convertFilter($infoVariable->variableNameDB);
//hora actual - 600 es igual
//se definen parametros de consulta
$eav = $this->marshaler->marshalJson('{
":startStamp": "' . ($this->currentTime - 600) . '",
":endStamp": "' . $this->currentTime . '"
}');
Now, the problem with this is that I can no longer guarantee that the last 10 minutes will be data.
I thought maybe expanding the pace but I would have the same problem.