The following code:
var _s3Client = new Amazon.S3.AmazonS3Client(RegionEndpoint.EUWest1);
Amazon.S3.Model.PutObjectRequest request = new Amazon.S3.Model.PutObjectRequest
{
BucketName = _bucketName, Key = keyName
};
using (FileStream stream = new FileStream(fileName, FileMode.Open))
{
request.InputStream = stream;
_s3Client.PutObject(request);
}
Throws this AmazonS3Exception when calling PutObject function:
{"Method not found: 'Void Amazon.Runtime.Internal.IRequest.set_DisablePayloadSigning(System.Nullable`1)'."}
Full stacktrace:
at Amazon.S3.Model.Internal.MarshallTransformations.PutObjectRequestMarshaller.Marshall(PutObjectRequest putObjectRequest)
at Amazon.Runtime.Internal.Marshaller.PreInvoke(IExecutionContext executionContext)
at Amazon.Runtime.Internal.Marshaller.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext)
at Amazon.Runtime.AmazonServiceClient.Invoke[TResponse](AmazonWebServiceRequest request, InvokeOptionsBase options)
at ParametersRunner.Program.TestAmazons3Client() in <pathToProgram>/Program.cs:line 243"
I'm targeting .NET Framework 4.5 & using AWSSDK.S3 v3.3.24.4
Upgrading AWSSDK.S3 to 3.7.0.32 and installing AWSSDK.Core 3.7.0.31 solved the issue