Problem
We have an Apache Flink application which was designed to read events from Kafka and emit the calculated results into ElasticSearch. Because of some resourcing problems we have to fallback from Kafka to Amazon S3.
The messages are published to Amazon S3 buckets in small batches in ndjson format.
The files are organized in the following way: /{year}/{month}/{day}/{hour}.
So, in every hour we create a new folder under which we store the most recent events.
Design
As we have seen Amazon S3 can emit notifications whenever a new object has been created.
We can push these notifications either into an SQS or into a Lambda.
- As it was stated in this topic SQS is not supported by Flink.
- In case of Lambda we can get the S3 object and push it on the Kinesis Data Stream
We have also found alternative solutions to avoid writing custom Lambda function:
Question
But in all cases we ended up using KDS. Is there any alternative to push data from Amazon S3 to Flink on object creation?