Is the Amazon .NET AWS SDK's AmazonS3 thread s

2020-01-31 23:44发布

Is the Amazon .NET AWS SDK's AmazonS3 thread safe or should I be creating a new instance of AmazonS3 per request in a multi-threaded system?

Specifically for the latest .NET AWS SDK (version 1.3.14).

2条回答
乱世女痞
2楼-- · 2020-02-01 00:08

I also asked this question on the Amazon AWS forum and an official AWS employee replied (Norm@AWS) with:

The .NET SDK is thread safe so keeping an instance of any of the clients like AmazonS3 around and reusing them is fine.

Norm

Link (Amazon .NET Development Forum - Is the .NET SDK's AmazonS3 thread safe?).

查看更多
兄弟一词,经得起流年.
3楼-- · 2020-02-01 00:10

I create a new instance every thread and it works fine. I think it's safe per-call to be honest, including asynchronous calls.

查看更多
登录 后发表回答