It is almost similar and It occurs when your AmazonS3Client is set to a different region then the bucket you are calling.
def s3Client = new AmazonS3Client(new BasicAWSCredentials("accessKey", "secretKey"))
s3Client.setRegion(com.amazonaws.regions.Region.getRegion( Regions.AP_NORTHEAST_1) )
def policy = s3Client.getBucketPolicy('joshuacalloway-us-east-1-bucket')
println policy
--> results in
Result: com.amazonaws.services.s3.model.AmazonS3Exception: The bucket is in this region: null. Please use this region to retry the request (Service: Amazon S3; Status Code: 301; Error Code: PermanentRedirect; Request ID: 5F941FB57305BDEC), S3 Extended Request ID: xajT6YydJU+EfoOFWtD4SFiaxS7zoOUS9OKAmFVq/CECmoNuCbcDu4q7z4L+kztbyrMxb5c/Bcw=
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1543)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1181)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:962)