Enclose exact phrases and terms that include non-alphanumeric characters in double quotation marks (""). https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
Then, how should I include a double quote itself in query?
Enclose exact phrases and terms that include non-alphanumeric characters in double quotation marks (""). https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html
Then, how should I include a double quote itself in query?
Escape the double quote with backslash: \"
Invalid character(s) in term '\'. The escape character itself is not supported.filter @message like /\"something\"/We had this kind of JSON:
{"code":"INPUT_VALIDATION_FAILED","fieldErrors":[{"field":"data","code":"INVALID_FORMAT"}]} I could parse it when I wrapped the sting in single quotes. Simple:
fields @timestamp, @message, @logStream, @log | filter @message like " Res: 400" | parse @message '{"code":"*",' as ERRORCODE | display ERRORCODE | sort @timestamp desc | limit 100 This read the json, and parsed the ERRORCODE (ie. the INPUT_VALIDATION_FAILED) from the json.