Maybe it is duplicated of this question: Write to a specific folder in S3 bucket using AWS Kinesis Firehose. But maybe in the last year appeared new options.
I would like to know which is the best way to send incoming data streams to a specific path or prefix in an s3 bucket.
For instance, let's say that I have the following JSON object:
{"clientId":2,"event":"click","url":"http://www.url.com/foo"}
I would like to store it in a path like this:
s3Bucket/{event}/{clientId} => s3Bucket/click/2
I'm considering these options:
- Kinesis firehose: Maybe is it possible in some way to set a custom prefix like the example?
- lambda function: Trigger a lambda function with the incoming streams and set the custom prefix reading the JSON object.
- Other options ...
There's a better way to do that? Which of the above options is the best choice?