S3Mock icon indicating copy to clipboard operation
S3Mock copied to clipboard

STANDARD storage class omitted

Open nikeee opened this issue 2 months ago • 3 comments

I'm building an S3 client and recently added S3Mock to the test matrix.

I noticed that the storage class is omitted when it's STANDARD. Looking at the changelog, this seems to be intentional: https://github.com/adobe/S3Mock/blob/db1e4a4f431b78bb8ee561f6f8ab7e20f0cbaf6d/CHANGELOG.md?plain=1#L613

The AWS docs declare StorageClass as nullable, so it's valid to omit it.

However, S3Mock is the only implementation - that I've tested so far - that does that. In my tests, AWS S3, Hetzner, Ceph, Garage, Minio, LocalStack and Backblaze include the storage class.

This brings up the question: As S3Mock is a mocking library that is used to reflect real-world-use, is this intentional? I want to emphasize that it's technically valid to omit the storage class as per AWS docs. I'm just not sure whether that's what this project wants to do.

nikeee avatar Nov 02 '25 17:11 nikeee

I tested all ITs against S3 in May 2024, and almost every test that validated the storage class if it was STANDARD failed against AWS APIs: https://github.com/adobe/S3Mock/commit/a97f2f3cb2912ff23bd923779f087e692ea01022

Maybe that changed in the last 18 months?

afranken avatar Nov 03 '25 10:11 afranken

Maybe it only affects ListObjectsV2. It seems to be omitted by some services on ListMultipartUploads. Or it has changed. I'll check.

nikeee avatar Nov 03 '25 12:11 nikeee

have you had time to check this yet?

afranken avatar Dec 03 '25 12:12 afranken