private boolean doesBucketExistV2(S3Client s3, String bucketName) {
        try {
            s3.headBucket(HeadBucketRequest.builder().bucket(bucketName).build());
            return true; // Bucket exists
        } catch (NoSuchBucketException e) {
            return false; // Bucket doesn't exist
        } catch (S3Exception e) {
            // Could be 403 Forbidden (bucket exists but no access), or other error
            if (e.statusCode() == 403) {
                return true; // Bucket exists but you don't have access
            }
            throw e; // Re-throw unexpected exception
        }
    }
Private helper function to get object from s3.

@param jobName The unique job name for each job(UUID).
@return TranscriptionJob object
tika-parsers/tika-parsers-ml/tika-transcribe-aws/src/main/java/org/apache/tika/parser/transcribe/aws/AmazonTranscribe.java