The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256

前端 未结 20 1693
既然无缘
既然无缘 2020-11-22 14:19

I get an error AWS::S3::Errors::InvalidRequest The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. when I try upload fi

20条回答
  •  广开言路
    2020-11-22 15:09

    Check your AWS S3 Bucket Region and Pass proper Region in Connection Request.

    In My Senario I have set 'APSouth1' for Asia Pacific (Mumbai)

    using (var client = new AmazonS3Client(awsAccessKeyId, awsSecretAccessKey, RegionEndpoint.APSouth1))
    {
        GetPreSignedUrlRequest request1 = new GetPreSignedUrlRequest
        {
            BucketName = bucketName,
            Key = keyName,
            Expires = DateTime.Now.AddMinutes(50),
        };
        urlString = client.GetPreSignedURL(request1);
    }
    

提交回复
热议问题