AWS FirehoseによってS3バケットにデータが保存され、いくつかの処理アプリに並行して渡される方法の例はたくさんあります(上の写真のように)。
しかし、処理アプリがクラッシュした場合に備えて、s3バケットからこのデータを再生する良い方法については何も見つかりません。そして、s3にあるが、Firehoseにはまだない履歴データを提供する必要があります。
FirehoseまたはLambdaで再生することを考えることができますが、次のようになります。
Or maybe there is some other way to put data back from s3 to stream which I completely miss?
EDIT: More over if we will run lambda for pushing records to stream probably it will have to rum more that 15 min. So another option is to run a script doing it which runs on separate EC2 instance. But this methods of extracting data from s3 looks so much more complicated than storing it there with Firehose, that is makes me think there should be some easier approach
The problem which stuck me was actually that I expect some more advanced serialization than just converting to JSON (as Kafka support AVRO for example).
Regarding replaying records from s3 bucket: this part of solution seems to be really significantly more complicated, than the one needed for archiving records. So if we can archive stream with out of the box functions of Firehose, for replaying it we will need two lambda functions and two streams.
First lambda is triggered manually, scans through all s3 bucket files and write their names to first stream. Second lambda function is triggered by every event is stream with file names, reads all the records in the file and sends them to final stream. From which there could be consumed but Kinesis Data Analytics or another Lambda.
このソリューションでは、1日に複数のファイルが生成され、すべてのファイルに複数のレコードがあることを想定しています。
このソリューションに似ていますが、私の場合、宛先は記事のDynamoではなくKinesisです。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加