title: AmazonS3 connection management
body: <p>Is there a recommended way to manage the connection to AmazonS3 when working with AWS?</p>
  
  <p>Typical Amazon S3 code(taken from Amazon official sample) looks usually like this?</p>
  
  <pre><code>AmazonS3 s3 = new AmazonS3Client(...);
  ...
  s3.putObject(new PutObjectRequest(bucketName, project.getName() + "/" + imageFile.getName(), imageFile));
  </code></pre>
  
  <p>Following are the questions:</p>
  
  <ul>
  <li><p>Is this a good idea to maintain a single AmazonS3Client used by everyone in the code or is it better to create one on every call?</p></li>
  <li><p>Is there a concept of connection pool like when working with MySQL for example?</p></li>
  <li><p>Are questions like disconnection(MySQL analogy: MySQL was restarted) relevant such that the AmazonS3Client would become invalid and require re-creation? What would be the right way to handle a disconnection if so?</p></li>
  <li><p>Does anyone know what features are provided by the spring integration with aws at:<a href="https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-aws" rel="noreferrer">https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-aws</a></p></li>
  </ul>
  
  <p>Thx.</p>