Is there a recommended way to manage the connection to AmazonS3 when working with AWS?
Typical Amazon S3 code(taken from Amazon official sample) looks usually like this?
AmazonS3 s3 = new AmazonS3Client(...);
...
s3.putObject(new PutObjectRequest(bucketName, project.getName() + "/" + imageFile.getName(), imageFile));
Following are the questions:
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?
Is there a concept of connection pool like when working with MySQL for example?
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?
Does anyone know what features are provided by the spring integration with aws at:https://github.com/spring-projects/spring-integration-extensions/tree/master/spring-integration-aws
Thx.