You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
S3Client.deleteObjects doesn't work in 2.30.0 #5805
deleteObjects now fails with Caused by: software.amazon.awssdk.services.s3.model.S3Exception: Missing required header for this request: Content-Md5. (Service: S3, Status Code: 400, Request ID: 181B4664E1D4B169, Extended Request ID: 39697cb5cac07bf2a227e0cd44c7b2e9184e7598e2abe41c55eb5028b44676ca) on Minio and other S3-compatible storages, while deleteObject with a single location works just fine.
Hi @wendigo, we tested deleteObjects with the aws s3 endpoint and it succeeds with the WHEN_REQUIRED setting.
My guess is that the issue is on the Minio/third-party side, they have to accommodate the changes released in 2.30.0. If the issue is indeed on the third-party side, I can't really explain why deleteObject works fine.
One workaround is to pin the Java SDK version to 2.29.52 until Minio adds support for the change.
The exception is being returned by Minio, the SDK is only unmarshalling the response. There's probably a difference in how Minio implemented the s3 compatibility internally.
DeleteObjects has always required a checksum, before today SDKs would compute an MD5 one for these requests. After today's object integrity change, SDKs now send a CRC32 checksum instead. Minio's implementation still appears to expect MD5.
DeleteObject singular optionally used checksums before, all the SDKs changed in that regard is sending one by default now.
To save other readers the trip over to the Minio issues board, they have not yet decided whether they're going to adapt to this change or not. So there's no timeline on resolution.
My personal opinion is that obviously they'll be forced to do it eventually if they want to stay current and keep calling themselves S3-compatible, unless the AWS team roll this change back.
Until they decide on a timeline I'm forced to not upgrade to 2.30.x.
Reacted by Mateusz "Serafin" Gajewski and Alex Henning Johannessen
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
My guess is that the issue is on the Minio/third-party side, they have to accommodate the changes released in 2.30.0. If the issue is indeed on the third-party side, I can't really explain why deleteObject works fine.
The S3 API reference of DeleteObjects explicitly requires a Content-MD5 header, while there's no such requirement in the API doc of the singular DeleteObject. I think that's why DeleteObject worked but DeleteObjects didn't.
I encountered a similiar problem today when using AWS Java SDK 2.32.25 to DeleteObjects on Alibaba Cloud's OSS, a S3-compatible service. I wonder if AWS will update the S3 API document to reflect this change, or update the SDK to make it compliant to the API doc.
Activity
zoewangg commentedon Jan 16, 2025
Taking a look
debora-ito commentedon Jan 16, 2025
Hi @wendigo, we tested
deleteObjectswith the aws s3 endpoint and it succeeds with theWHEN_REQUIREDsetting.My guess is that the issue is on the Minio/third-party side, they have to accommodate the changes released in
2.30.0. If the issue is indeed on the third-party side, I can't really explain whydeleteObjectworks fine.One workaround is to pin the Java SDK version to
2.29.52until Minio adds support for the change.wendigo commentedon Jan 16, 2025
@debora-ito why the
deleteObjectworks whiledeleteObjectsdoesn't? This doesn't make much sensedebora-ito commentedon Jan 16, 2025
The exception is being returned by Minio, the SDK is only unmarshalling the response. There's probably a difference in how Minio implemented the s3 compatibility internally.
lucix-aws commentedon Jan 16, 2025
DeleteObjectshas always required a checksum, before today SDKs would compute an MD5 one for these requests. After today's object integrity change, SDKs now send a CRC32 checksum instead. Minio's implementation still appears to expect MD5.DeleteObjectsingular optionally used checksums before, all the SDKs changed in that regard is sending one by default now.henricook commentedon Jan 17, 2025
To save other readers the trip over to the Minio issues board, they have not yet decided whether they're going to adapt to this change or not. So there's no timeline on resolution.
My personal opinion is that obviously they'll be forced to do it eventually if they want to stay current and keep calling themselves S3-compatible, unless the AWS team roll this change back.
Until they decide on a timeline I'm forced to not upgrade to 2.30.x.
henricook commentedon Jan 18, 2025
Update: Minio have said they'll make the change (thanks Minio team!). No timeline yet but it does sound like it's mostly a cherry-pick.
minio/minio#20845 (comment)
debora-ito commentedon Jan 21, 2025
Thank you for keeping us posted @henricook.
Minio released support for the S3 checksum changes, so I'll go ahead and close this.
github-actions commentedon Jan 21, 2025
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
joviegas commentedon Feb 21, 2025
Added workaround Here
ziqin commentedon Aug 21, 2025
@debora-ito
The S3 API reference of
DeleteObjectsexplicitly requires aContent-MD5header, while there's no such requirement in the API doc of the singularDeleteObject. I think that's whyDeleteObjectworked butDeleteObjectsdidn't.I encountered a similiar problem today when using AWS Java SDK 2.32.25 to
DeleteObjectson Alibaba Cloud's OSS, a S3-compatible service. I wonder if AWS will update the S3 API document to reflect this change, or update the SDK to make it compliant to the API doc.[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
[fix](S3)Downgrade the AWS SDK version to avoid impacting other S3-co…
pin aws-sdk to 2.29.52 (#166)
pin aws-sdk to 2.29.52 (#271)
pin aws-sdk to 2.29.52 (#76)
[PLAT-20995]Downgrade AWS SDK v2 for fixing deleteObjects bug
[BACKPORT-2026.1][PLAT-20995]Downgrade AWS SDK v2 for fixing deleteOb…
[BACKPORT-2025.2][PLAT-20995]Downgrade AWS SDK v2 for fixing deleteOb…