title: mule download all files from s3 bucket
body: <pre><code>&lt;flow name="listobjects"&gt;
      &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="listobjects" contentType="text/plain" doc:name="HTTP"/&gt;
      &lt;s3:list-objects config-ref="Amazon_S3" bucketName="demo"  doc:name="Amazon S3" maxKeys="5" /&gt;
  
     &lt;!--  &lt;payload-type-filter expectedType="java.util.List" doc:name="Payload"/&gt; --&gt;
      &lt;foreach collection="#[payload]" doc:name="For Each"&gt;
     &lt;!-- &lt;foreach doc:name="For Each file"&gt; --&gt;
       &lt;logger message=" inside foreach...... #[payload.getKey()]  ...." level="INFO" doc:name="Logger" /&gt;
          &lt;s3:get-object-content config-ref="Amazon_S3" bucketName="demo" key="#[payload.getKey()]"  doc:name="Amazon S3"/&gt;
          &lt;object-to-byte-array-transformer/&gt;
        &lt;file:outbound-endpoint path="C:\output" responseTimeout="10000" doc:name="File" outputPattern="#[payload.getKey()] "&gt;&lt;/file:outbound-endpoint&gt; 
      &lt;/foreach&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p>I have bucket name called demo.
  In that bucket I have 3 pdf files. I want to download all files and put it in c:\output folder.</p>
  
  <p>I hit my url like <a href="http://localhost:8081/listobjects" rel="nofollow">http://localhost:8081/listobjects</a>.</p>
  
  <p>But I got the error:</p>
  
  <blockquote>
    <p>Could not find a transformer to transform "CollectionDataType{type=org.mule.module.s3.simpleapi.SimpleAmazonS3AmazonDevKitImpl$S3ObjectSummaryIterable, itemType=com.amazonaws.services.s3.model.S3ObjectSummary, mimeType='<em>/</em>'}" to "SimpleDataType{type=org.mule.api.transport.OutputHandler, mimeType='<em>/</em>'}". (org.mule.api.transformer.TransformerException) (org.mule.api.transformer.TransformerException). Message payload is of type: SimpleAmazonS3AmazonDevKitImpl$S3ObjectSummaryIterable</p>
  </blockquote>