Open ahmarsuhail opened 8 months ago
Hello Ahmar,
I was able to reproduce this. The issue here is that when we implemented ranged gets in S3EC v3, we decided to maintain compatibility with the S3EC v1/v2 clients. In v1/v2 this form of range returns an empty object. Since this is a deliberate design decision, it would be a breaking change to modify the behavior at this point. Do you need SDK v2-style ranged get behavior specifically? If so, we would need to add it as a new feature i.e. with a configuration option to enable the behavior. Thanks!
@justplaz - Yes it would be great to add that to make sure downstream application doesn't break when using normal S3 client and encrypted S3 client.
Problem:
I created a 64KB (65536 bytes) with S3Encryption client, and then did
So end of range
65635
is greater than EOF at65536
. And no error was thrown.Creating a file with a regular S3 client and then doing
throws
software.amazon.awssdk.services.s3.model.S3Exception: The requested range is not satisfiable (Service: S3, Status Code: 416, Request ID:
which is what we expect to be thrown in S3A.Solution:
S3 Encryption client should also throw a 416 range not satisfiable error.