title: Is there a way to manually set an ElasticSearch document id when inserting via AWS Kinesis Firehose?
body: <p>I have an AWS Kinesis Firehose Stream set up to feed data into an AWS ElasticSearch cluster, and I can successfully insert documents by sending them to the Firehose Stream, which loads them into ElasticSearch.</p>
  
  <p>But I would like to be able to manually specify/set a document's <code>id</code> value when sending it off to the Firehose Stream. I'm successfully using the AWS PHP SDK to send data to Firehose, I just can't figure out if there's a way to manually set a document's <code>id</code>.</p>
  
  <pre><code>$firehoseParams = [
      'DeliveryStreamName' =&gt; 'myStreamName', // REQUIRED
      'Record' =&gt; [ // REQUIRED
          'Data' =&gt; '{"json_encoded": "data", ...}', // REQUIRED
      ],
  ];
  $firehoseResult = $this-&gt;_firehoseClient-&gt;putRecord($firehoseParams);
  </code></pre>
  
  <p>I've tried setting <code>id</code>, <code>_id</code>, and <code>esDocumentId</code> values in the JSON data, all to no avail.</p>
  
  <p>Anyone have any ideas?</p>