title: Merging pdf files stored on Amazon S3
body: <p>Currently I'm using pdfbox to download all my pdf files on my server and then using pdfbox to merge them together. It's working perfectly fine but it's very slow--since I have to download them all.</p>
  
  <p>Is there a way to perform all of this on S3 directly? I'm trying to find a way to do it, even if not in java also in python and unable to do so.</p>
  
  <p>I read the following:</p>
  
  <p><a href="https://stackoverflow.com/questions/19655285/merging-files-on-s3-amazon">Merging files on S3 Amazon</a></p>
  
  <p><a href="https://github.com/boazsegev/combine_pdf/issues/18" rel="nofollow noreferrer">https://github.com/boazsegev/combine_pdf/issues/18</a></p>
  
  <p>Is there a way to merge files stored in S3 without having to download them?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The way I ended up doing it was using <code>concurrent.futures</code> and implementing it with <code>concurrent.futures.ThreadPoolExecutor</code>. I set a maximum of 8 worker threads to download all the pdf files from s3.</p>
  
  <p>Once all files were downloaded I merged them with pdfbox. Simple.</p>