8

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?

Richard
  • 1,289
  • 12
  • 25
  • @john-wu I've reworded my question slightly. My question is not fully answered with the answers from the duplicate. – Richard Mar 21 '19 at 16:58
  • [Link](https://stackoverflow.com/questions/16354966/does-amazon-s3-have-a-connection-pool). Please [search before asking](https://meta.stackexchange.com/a/17498). – John Wu Mar 21 '19 at 18:04
  • @JohnWu that's Java unfortunately. – Richard Mar 21 '19 at 20:23

0 Answers0