Categories
Mastering Development

CloudWatchLogs filterLogEvents empty events

I am trying to get CloudWatchLogs filterLogEvents by sending parameters.
some times it work and sends me the exact logs in that time, but for the different lambda function it returns empty events with next token.

parameters = {

‘logGroupName’ : metricFilter.logGroupName,
‘filterPattern’ : metricFilter.filterPattern ? metricFilter.filterPattern : "",
‘startTime’ : timestamp – offset,
‘endTime’ : timestamp
};

i am retrying by sending parameters with next token but its still getting empty events. Does anyone has idea about it?

{
    "events": [],
    "searchedLogStreams": [],
    "nextToken": "long text"
}

Leave a Reply

Your email address will not be published. Required fields are marked *