-
Notifications
You must be signed in to change notification settings - Fork 871
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
S3CrossRegionSyncClient with s3.amazonaws.com endpoint throws 400 for non-existent buckets and objects #4846
Comments
Just some additional context, we're facing an issue in Hadoop S3A where Spark will set the endpoint to See https://issues.apache.org/jira/browse/HADOOP-19044 for more info. |
|
When cross region access is enabled,
If cross region access is not enabled,
Sure, let me try out leaving endpoint resolution to client. Thanks @joviegas. |
Are there any more questions regarding this issue? |
For central endpoint, leaving endpoint resolution to the client seems to be working fine so far. |
Marking this to auto-close soon then. Let us know if there's any follow-up questions. |
Describe the bug
When we set endpoint as
s3.amazonaws.com
with cross-region access enabled, S3CrossRegionSyncClient is unable to throw 404 for non-existent buckets and objects. It rather returns 400.e.g.
Expected Behavior
Non-existent object:
Exception of format:
software.amazon.awssdk.services.s3.model.NoSuchKeyException: null (Service: S3, Status Code: 404, Request ID: N02Z0Y034BCY72W9, Extended Request ID: AoVnLQe5MjDd9IyDUWGPsRJo+AtrziK40ImJI/e2qYQT9fyeYG0bpxkNv8LR3NzcLtEhN0eM6u8=) (Service: S3, Status Code: 404, Request ID: N02Z0Y034BCY72W9)
Non-existent bucket:
Exception of format:
software.amazon.awssdk.services.s3.model.NoSuchBucketException: null (Service: S3, Status Code: 404, Request ID: BQ881CNTXACAJ5N3, Extended Request ID: MoSDCAY/R+O3eIzjMhkrqnObhs7EgJT+d7D48eG2MlnlT03G0WQmC4Je29KGjWjIYKOh8qujSCs=) (Service: S3, Status Code: 404, Request ID: BQ881CNTXACAJ5N3)
Current Behavior
Reproduction Steps
Set endpoint:
s3.amazonaws.com
Set region:
us-east-2
(orus-east-1
)Enable cross region access:
true
client#headObject
call for non-existent object.client#headBucket
call for non-existent bucket.Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.23.5
JDK version used
openjdk version "1.8.0_362"
Operating System and version
macOS, 14.2.1 (23C71)
The text was updated successfully, but these errors were encountered: