New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use CompleteMultipartUploadRequest with presigned URL #4196
Comments
Here you can see a very similar code that makes the same MPU, except it doesn't use presigned URLs. |
Attaching the POM file. |
Replace the parameter --data in the curl command with --data-raw, and it can run successfully on my side |
-- Data in curl Cmd aside to Replace -- Data--Raw its work maybe |
I am seeing the same issue with presignedCompletedMultipartUpload URL. Error on trying to POST with presignedCompletedMultipartUpload URL, with the part numbers and respective ETag info: AWS Java SDK version used JDK version used Operating System and version |
I'm trying with a Java-based HTTP request as well as with cUrl. Both failing. Didn't work with @notnonot Were you able to make it work? Please, would you kindly share your commands? From the MPU creation, to the parts upload, to the complete MPU request? |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I need to make a Multipart Upload using presigned URLs.
I understand I need to create one URL for the
CreateMultipartUploadRequest
, one for eachUploadPartRequest
, and one for theCompleteMultipartUploadRequest
.I am able to make the create-mpu and the upload-part, but I always get
SignatureDoesNotMatch
for the complete-mpu, no matter what I try.Expected Behavior
I expected that once I create an XML in the correct format, I'd be able to call the presigned URL for the
CompleteMultipartUploadRequest
and it would successfully create the target file.Current Behavior
I am able to successfully generate the presigned URL for the complete-mpu.
However, when I try to call it, I always get error
SignatureDoesNotMatch
.(actual bucket name replaced with
mybucket
)As you can see, the content-type is set to
application/x-www-form-urlencoded
. I already tried withapplication/octet-stream
and also forcing cUrl to send no content-type, but the result is always the same.Reproduction Steps
I tried to make the code as simple and straightforward as possible, although still keeping it complete (so you can see that create-mpu and upload-part work, it's only complete-mpu that fails). You only need to fill up the configuration in method
test
and run the code to see the error.Possible Solution
No response
Additional Information/Context
It's important to mention that I am able to make the MPU with no presigned URLs. i.e, I have confirmed that the credentials are valid, and that they have permission to
s3:PutObject
, and that the API works correctly for completing an MPU. The issue only arises when using presigned URLs.It's also relevant to mention that if I take the complete-mpu XML payload, convert it to JSON, and pass it to the CLI, the MPU gets completed successfully. That confirms that create-mpu and upload-part steps are working as expected.
Output of running the code.
AWS Java SDK version used
2.20.103
JDK version used
1.8.0_351
Operating System and version
macOS 13.4.1
The text was updated successfully, but these errors were encountered: