aws logs: The specified log group does not exist

cyrf picture cyrf · Mar 30, 2019 · Viewed 17.1k times · Source

I'm trying to grab logs from Cloudwatch with this CLI usage:

cat cli-get-log-events.json    
{
    "logGroupName": "/aws/lambda/my-group", 
    "logStreamName": "2019/03/30/[$LATEST]dec1626296d84819be42f2ef615f292e", 
    "startTime": 1553977650000, 
    "endTime": 1553977748000, 
    "limit": 10, 
    "startFromHead": true
}


aws logs get-log-events --cli-input-json file://cli-get-log-events.json

But I see this error in the response:

An error occurred (ResourceNotFoundException) when calling the GetLogEvents operation: The specified log group does not exist.

Answer

Michael Durrant picture Michael Durrant · Oct 30, 2019

Your problem could be the region.

It turned out it wasn't for the OP but it might be for you looking at this question!

For example I had to add --region 'us-east-2' to fix a similar problem of log group not found when calling from the CLI