# Error "Bytes must be provided" on S3 sink

**URL:** <https://ask.lenses.io/t/error-bytes-must-be-provided-on-s3-sink/265>\
**Category:** Apache Kafka Connectors\
**Tags:** kafka-connect, s3\
**Created:** [July 25, 2024, 11:54am UTC](https://ask.lenses.io/t/error-bytes-must-be-provided-on-s3-sink/265 "2024-07-25T11:54:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauro-dellachiesa-bl](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/mauro-dellachiesa-bl/32/128_2.png) [@mauro-dellachiesa-bl](https://ask.lenses.io/u/mauro-dellachiesa-bl)\
**Post date:** [July 25, 2024, 11:54am UTC](https://ask.lenses.io/t/error-bytes-must-be-provided-on-s3-sink/265/1 "2024-07-25T11:54:14Z")

</div>

Hello everyone!  
I’m trying to use the S3 Sink connector and after several attempts I got it running. The problem is that a few moments after it started, I see this error in the logs:

`Encountered error [requirement failed: Bytes must be provided]`

My guess is that a tombstone was found and the connector is not gracefully treating it.  
How can I get some help understanding what is causing the issue?

**Connector version:** ([https://github.com/lensesio/stream-reactor/releases/download/7.3.2/kafka-connect-aws-s3-7.3.2.zip](https://github.com/lensesio/stream-reactor/releases/download/7.3.2/kafka-connect-aws-s3-7.3.2.zip)

**Connector configuration:**

```auto
connector.class=io.lenses.streamreactor.connect.aws.s3.sink.S3SinkConnector
connect.s3.kcql=INSERT INTO aBucket:aPrefix SELECT * FROM `*` STOREAS BYTES PROPERTIES ('flush.count'=1)
topics=list,of,topics
tasks.max=5
connect.s3.seek.max.files=20
name=msk-s3-sink
connect.s3.aws.region=us-east-1 value.converter=org.apache.kafka.connect.converters.ByteArrayConverter errors.log.enable=true key.converter=org.apache.kafka.connect.converters.ByteArrayConverter

```

---

<div class="post-metadata">

**Author:** ![stheppi](https://dub1.discourse-cdn.com/flex017/user_avatar/ask.lenses.io/stheppi/32/30_2.png) [@stheppi](https://ask.lenses.io/u/stheppi)\
**Post date:** [October 17, 2024, 8:38am UTC](https://ask.lenses.io/t/error-bytes-must-be-provided-on-s3-sink/265/2 "2024-10-17T08:38:08Z")

</div>

Hi mauro,

Indeed there is a gap in the sink when handling tombstones. It will be addressed in the near future.

For now the best option is to filter the records out via an SMT. Here is the configuration:

```auto
"transforms" : "dropNullRecords",
"transforms.dropNullRecords.type" : "org.apache.kafka.connect.transforms.Filter",
"transforms.dropNullRecords.predicate": "isNullRecord",

"predicates" : "isNullRecord",
"predicates.isNullRecord.type" : "org.apache.kafka.connect.transforms.predicates.RecordIsTombstone"

```
