I am migrating / upgrading a project from Java SDK v1
to Java SDK v2
.
One of the functions needed for the project auto-detects the region and saves it.
And as an error checking measure after setting the region it calls getRegionName() on the AmazonS3Client
.
In v2 of the SDK, AmazonS3Client
is replaced with S3Client
. As far as I can tell, there is no getRegionName
. Any ideas what I could use instead?
In S3Client Java SDK v2 there is getBucketLocation
function that returns the region bucket resides in.
You can also find more info in the official docs.