Reading JSON events from AWS CloudWatch Logs #17630
Unanswered
mikelorant
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hi @mikelorant ! Others have run into this before too. The recommended solution is to have whatever is sending the data to CloudWatch Logs include a newline at the end of each entry. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When trying to read events from AWS CloudWatch Logs, a CloudWatch Logs subscription filter is required. This filter can send to Kinesis or Kinesis Firehose however the events are batched. Kinesis Firehose allows for the events to be written to objects in S3.
When looking at the objects in S3, the batched events are on a single line without a delimiter. This means that 3 objects of
A
,B
andC
will be converted to a single line of{A}{B}{C}
. This is causing considerable difficulty in transforming this back to individual events.Is there a method to handle JSON streams where multiple JSON objects are sent on the same line. Obviously if these were newline delimited this would be an easy problem to solve however AWS have made this difficult by not providing a customisable delimiter. Also, these are not a valid JSON array, so array conversion is not useful.
Any help would be greatly appreciated as this has become a blocker to using Vector on a project I am working on.
Beta Was this translation helpful? Give feedback.
All reactions