title: How can I batch doesObjectExist() requests to Amazon S3?
body: <p>I need to check whether a set of keys exist in S3, for each of a large number of items. (Each set of keys relates to one of the large number of items).</p>
  
  <p>I am using the PHP SDK (v2)</p>
  
  <p>Currently I am calling <code>$client-&gt;doesObjectExist(BUCKET, $key)</code> for each of the keys, which is a bottleneck (the round-trip time to S3 for each call).</p>
  
  <p>I would prefer to do something like <code>$client-&gt;doesObjectExist(BUCKET, $batch)</code> where <code>$batch = array($key1, $key2 ... $keyn)</code>, and for the client to check all of those keys then come back with an array of responses (or some other similar structure).</p>
  
  <p>I have come across a <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LowLevelPHPBatchOperationsExample.html" rel="nofollow">few</a> <a href="http://docs.aws.amazon.com/aws-sdk-php-2/guide/latest/performance.html#comparing-sdk1-and-sdk2" rel="nofollow">references</a> to a "batch api" which sounds promising, but nothing concrete. I'm guessing that this might have been present only in the v1 SDK.</p>