iron-spi-aws/src/main/java/io/axway/iron/spi/aws/s3/AwsS3Utils.java
static String checkBucketIsAccessible(AmazonS3 amazonS3, String bucketName) {
        HeadBucketRequest headBucketRequest = new HeadBucketRequest(bucketName);
        try {
            amazonS3.headBucket(headBucketRequest);
        } catch (AmazonServiceException e) {
            throw new AwsS3Exception("Bucket is not accessible", args -> args.add("bucketName", bucketName), e);
        }
        return bucketName;
    }
static String checkBucketIsAccessible(AmazonS3 amazonS3, String bucketName) {
        HeadBucketRequest headBucketRequest = new HeadBucketRequest(bucketName);
        try {
            amazonS3.headBucket(headBucketRequest);
        } catch (AmazonServiceException e) {
            throw new AwsS3Exception("Bucket is not accessible", args -> args.add("bucketName", bucketName), e);
        }
        return bucketName;
    }
static String checkBucketIsAccessible ( AmazonS3 amazonS3 , String bucketName ) { HeadBucketRequest headBucketRequest = new HeadBucketRequest ( bucketName ) ; try { amazonS3 . headBucket ( headBucketRequest ) ; } catch ( AmazonServiceException e ) { throw new AwsS3Exception ( "Bucket is not accessible" , args -> args . add ( "bucketName" , bucketName ) , e ) ; } return bucketName ; }
Throws an exception if the bucket does not exist or is not readable.

@param amazonS3 Amazon S3 client
@param bucketName bucket name
Throws an exception if the bucket does not exist or is not readable .