-
Notifications
You must be signed in to change notification settings - Fork 355
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
Shorter timeout for get bucket location #6295
Conversation
No linked issues found. Please add the corresponding issues in the pull request description. |
// calling `client.getBucketLocation(bucket)`. | ||
if (region.equals(Region.US_Standard)) "us-east-1" | ||
else region.toString | ||
Region.fromValue(bucketRegion).toAWSRegion().getName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if region returns US Standard
?
Will it still work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in this case:
- Region.fromValue will return
com.amazonaws.services.s3.model.Region.US_Standard
. - Then, calling
toAWSRegion
will returnRegionUtils.getRegion("us-east-1")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then getName
will return US
again, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No: from the docs of com.amazonaws.regions.Region
:
The unique system ID for this region; ex: "us-east-1".
(also tested manually)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💣
To avoid long wait when GetBucketLocation is forbidden for the execution role.