def _connect_to_S3_bucket(self, s3, bucket_name): s3_bucket = s3.Bucket(bucket_name) exists = s3_helper.bucket_exists(s3, bucket_name) if not exists: s3_bucket = s3.create_bucket(Bucket=bucket_name) return s3_bucket