finalizeMultipartUpload is throwing 404 error
savan143 opened this issue · comments
Upcoming End-of-Support
- I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.
Describe the bug
We are utilizing multipart upload feature in our application. It has 4 steps.
- InitializeMultipartUpload
- GenerateS3SignedUrl
- Upload Parts
- FinalizeMultipartUpload
Here whole flow was working fine before we enabled public access block on our S3s.
After enabling this public access block we are doing all transaction using CF url instead of direct s3 url. Here First 3 steps are working fine where 4th step(FinalizeMultipartUpload) is throwing below error.
The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchUpload; Request ID: DF9DESQHKG183Q2D; S3 Extended Request ID: GAVKk1LSbjHWN6pMDw3lA3b8YjF8crE+xg8YyVjPiVxnv5wSrx1PqBcnpk3ry90r5HGOof11GaYxyz=; Proxy: null)
Can someone please help us finding the missing logic here if we are missing anything?
Current SDK version we are using is 1.12.410.
Expected Behavior
It was working fine before public access block and that's what we are expecting.
Current Behavior
FinalizeMultipartUpload method is throwing below error.
The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchUpload; Request ID: DF9DESQHKG183Q2D; S3 Extended Request ID: GAVKk1LSbjHWN6pMDw3lA3b8YjF8crE+xg8YyVjPiVxnv5wSrx1PqBcnpk3ry90r5HGOof11GaYxyz=; Proxy: null)
Reproduction Steps
Mentioned steps in description which we are following currently in our application.
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
1.12.410
JDK version used
java-base:17-temurin
Operating System and version
Java
@fulghum @shorea @manikandanrs @david-at-aws @dagnir @varunnvs92 @zachmu @spfink @zoewangg @EronHennessey @hansonchar @mateusz-lisik any input/help would be appreciated here.
@savan143 The error means S3 is saying that the uploadId you provided in the FinalizeMultipartUpload step was not found on the service side.
If the flow worked fine when accessing S3 directly, but the exact same code is not working when using Cloudfront, you should check if any request attribute is being altered in the communication to S3 after the change. I suggest you generate more detailed logs, like verbose wirelogs, of the request attribute values before and after the change, to compare and help identify the difference.
It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.