When using an AmazonS3Client
in a webapplication, is it recommended to create one instance for the whole lifetime of the application or should I create a new instance every time I'm doing an upload to S3?
I can't find any documentation on this other than the Java client where a singleton approach is recommended.
I'm interested in this because for HttpClient
it is known that you should not create more than one instance.
For example, is there some kind of pooling / connection management in the AmazonS3Client
? There is AmazonS3Config.ConnectionLimit
, but I can't find a lot of documentation about it. How does this work when you use Parallel.ForEach
to get maximum throughput?