We have created a quick proof-of-concept to stream the changes in a DynamoDB table to a Lambda function. This function does some basic ETL-processing and puts records on a Firehose. This Firehose writes Parquet files to S3, for some Athena querying. This works extremely well and easy for inserts, but I was wondering if there are tips or best practices for dealing with removals or updates.
I remember vaguely from a past conference that some people run batch jobs to compact the data and delete marked data, but I cannot find any details on this. Change Data Capture is another term, but I've yet to see clear examples of this. Is there a way of dealing with updates in this streaming setup?
UPDATE: I might have phrased my question poorly since a lot of the focus is going to S3. I'm really looking for a flow to process the incoming removals and updates in the DynamoDB stream, save them somewhere and then periodically update the Parquet file to reflect these updates and removals. Maybe some compaction will be needed as well, but that's "nice to have" at this stage in my experiment.