Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon AWSClientFactory does not exists

I created an empty .Net Core application and installed nuget packages for Both Amazon.Core and Amazon.S3.

Then I tried to use S3 to get an object but I'm stuck at the very first moment... Amazon.AWSClientFactory is nowhere to be found inside the assembly. Even with dotPeek I tried to search this factory method but I couldn't find it. Even the sample code from Amazon doesn't work.

Where I supposed to find this class ?

like image 343
Pouyan Avatar asked Apr 27 '17 21:04

Pouyan


1 Answers

Amazon.Core and Amazon.S3 are part of the AWS SDK for .NET v3. Per the AWS SDK for .NET Version 3 Migration Guide:

Change: AWSClientFactory is removed

Description: Use service client constructors instead of the AWSClientFactory

Or in other words, use IAmazonS3 and AmazonS3Client found in the Amazon.S3 nuget package:

using (IAmazonS3 client = new AmazonS3Client())
{
  // do stuff
}

Further Reading

  • AWS Documentation - Get an Object Using the AWS SDK for .NET
  • AWS Documentation - AmazonS3Client
like image 55
Anthony Neace Avatar answered Nov 05 '22 17:11

Anthony Neace