I used AmazonS3Client.generatePresignedUrl to create a signed url for CompleteMultipartUploadResult, but when I used this url, it failed. Here is a part of the error message:
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
I saw the doc here doesn't include the POST method: https://github.com/aws/aws-sdk-java/blob/1.11.308/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/GeneratePresignedUrlRequest.java#L42
Is the above error because CompleteMultipartUploadResult must be a POST request?
Are you specifying post when generating the presigned url? Can you provide a code sample?
Are you specifying post when generating the presigned url? Can you provide a code sample?
Yes. What's I'm doing is using SDK to initiate multipart upload and upload parts. Then I call AmazonS3Client.generatePresignedUrl to generate a url. But this URL seems cannot be used.
I saw some discussion here and am not sure if it's supported: https://github.com/aws/aws-sdk-js/issues/1603
This page (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) also mentioned that The content in this section does not apply to HTTP POST. For more information, see Browser-Based Uploads Using POST (AWS Signature Version 2). Sounds like POST is different than GET and PUT.
A note to Java SDK team, see TT0146774011.
This is not currently supported in the SDK. After discussion with S3 team, it seems there are complexities to support this feature. We don't have plans to support this feature in v1 unless requested by many customers. You can certainly open a feature request in 2.0 SDK. We can prioritize it when implementing TransferManager, S3 high level utility.
@varunnvs92 could you elaborate on why this cannot be achieved?
@shorea, is that a cryptic: "I told you so" :D:D
Apart from technical limitations or won't fix it, what is the underline problem?
I guess the POST request validation routine (AWS server-side) is looking for additional data which is not provided by AmazonS3Client.generatePresignedUrl
My application has the requirement to allow file upload for ~= 10GB files and using strong security in mind and leaving AWS credentials present on the client machine it simply won't do it.
FYI, other AWS S3 SKDs provide this functionality, like PHP and JS.
This feature is not even on the roadmap of aws-java-sdk 2.0, so i suspect that it will be a while before this is provided.
Therefore i would prefer get informed of the issue and code a workaround.
Regards
Andrea
Most helpful comment
This is not currently supported in the SDK. After discussion with S3 team, it seems there are complexities to support this feature. We don't have plans to support this feature in v1 unless requested by many customers. You can certainly open a feature request in 2.0 SDK. We can prioritize it when implementing TransferManager, S3 high level utility.