I want to use create-export-task to store some logs into S3.
Given my CloudWatch logs appear in the following format:
{ "message": "Example message", "errorCode": "MY_ERROR_CODE_1", "someFlag": "flag", "otherFlag": "flag2", "level": "error" }
{ "message": "All good", "level": "info" }
Is it possible to use the query
param to filter the response data given the above log structure?
My JMESPath attempts so far have been unsuccessful (e.g. --query "level"
to only get the level data). I'm not sure whether the log structure is incorrect for this use or if I have misunderstood the purpose of the query
param.