-
When using the S3 source, AWS sends a The message looks like: {
"Messages": [
{
"MessageId": "c8f6eb9e-4c90-4154-9502-5a4d9dc5c78e",
"ReceiptHandle": "XXX...XXX==",
"MD5OfBody": "b33da647a485a3745e1111277ec590d2",
"Body": "{\"Service\":\"Amazon S3\",\"Event\":\"s3:TestEvent\",\"Time\":\"2022-08-11T14:22:40.084Z\",\"Bucket\":\"vector-log-pipeline--xxx\",\"RequestId\":\"1YXFCPKNH9RYDP5P\",\"HostId\":\"Jq470yic8yEPATd6Hw3BmamYkq7l/vb9QKrIZWp46LnrGQmvDsGnitgmylQs/jfW7QbE2RkML1w=\"}"
}
]
} And vector doesn't like it, with our logs filling up with: {
"timestamp": "2022-08-15T09:18:16.410889Z",
"level": "ERROR",
"message": "Failed to process SQS message.",
"message_id": "c8f6eb9e-4c90-4154-9502-5a4d9dc5c78e",
"error": "Could not parse SQS message with id c8f6eb9e-4c90-4154-9502-5a4d9dc5c78e as S3 notification: missing field `Records` at line 1 column 247",
"error_code": "failed_processing_sqs_message",
"error_type": "parser_failed",
"stage": "processing",
"target": "vector::internal_events::aws_sqs::s3",
"span": {
"component_id": "s3",
"component_kind": "source",
"component_name": "s3",
"component_type": "aws_s3",
"name": "source"
},
"spans": [
{
"component_id": "s3",
"component_kind": "source",
"component_name": "s3",
"component_type": "aws_s3",
"name": "source"
}
]
} What options do we have for making vector handle it quietly/properly? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Would something like this work? i.e. Define a S3TestEvent struct and test if the event successfully deserializes, and skip processing early for this edge case.
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay, I needed to get some guidance wrt. the CLA. We're all good now, so I've filed this PR. |
Beta Was this translation helpful? Give feedback.
Would something like this work?
i.e. Define a S3TestEvent struct and test if the event successfully deserializes, and skip processing early for this edge case.