diff --git a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java index 2e13deb81c1..d9cb1d97bf5 100644 --- a/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java +++ b/hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/auth/ITestCustomSigner.java @@ -133,11 +133,7 @@ public class ITestCustomSigner extends AbstractS3ATestBase { } private String determineRegion(String bucketName) throws IOException { - AmazonS3 s3 = AmazonS3ClientBuilder.standard().withCredentials( - new SimpleAWSCredentialsProvider(null, createConfiguration())) - .withForceGlobalBucketAccessEnabled(true).withRegion("us-east-1") - .build(); - String region = s3.getBucketLocation(bucketName); + String region = getFileSystem().getBucketLocation(bucketName); return fixBucketRegion(region); }