Question:
I’m trying to grab logs from Cloudwatch with this CLI usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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:
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