title: Best way to set custom path/ prefix in a aws s3 bucket
body: <p>Maybe it is duplicated of this question: <a href="https://stackoverflow.com/q/50340543/174777">Write to a specific folder in S3 bucket using AWS Kinesis Firehose</a>. But maybe in the last year appeared new options.</p>
  
  <p>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.</p>
  
  <p>For instance, let's say that I have the following JSON object:</p>
  
  <pre><code>{"clientId":2,"event":"click","url":"http://www.url.com/foo"}
  </code></pre>
  
  <p>I would like to store it in a path like this: </p>
  
  <pre><code>s3Bucket/{event}/{clientId} =&gt; s3Bucket/click/2 
  </code></pre>
  
  <p>I'm considering these options:</p>
  
  <ul>
  <li>Kinesis firehose: Maybe is it possible in some way to set a custom prefix like the example?</li>
  <li>lambda function: Trigger a lambda function with the incoming streams and set the custom prefix reading the JSON object.</li>
  <li>Other options ...</li>
  </ul>
  
  <p>There's a better way to do that? Which of the above options is the best choice?</p>