0

I am using pyarrow fs.S3FileSystem library to write a csv to s3 bucket. Although this code runs fine in my local when I deploy to VM (linux) it throws error: OSError: When listing objects under key xx in bucket xx: AWS Error NETWORK_CONNECTION during ListObjectsV2 operation: curlCode: 60, SSL peer certificate or SSH remote key was not OK

I am guessing its doing SSL validation so want to disable SSL and there is no way to disable using fs.S3FileSystem API.

Here's the pyarrow code:

from pyarrow import fs
s3 = fs.S3FileSystem(access_key='', secret_key='', endpoint_override=''

I then tried to use s3FS.S3FileSystem API using verify as False but this time it throws error while writing CSV to S3 location:

Error: OSERROR: [Errno 22] The XML you provided was not well-formed or did not validate against our published schema.

import s3fs
s3_fs = s3fs.S3FileSystem(key='', secret='', client_kwargs={'endpoint_url' : '', 'verify': False})
data = pandasTable.to_csv(index=False)
with s3_fs.open('s3://{bucket_name}/{csv_file_path.csv}', 'wb') as out_file:
    out_file.write(data)

I also tried setting curl_ca_bundle to empty string

os.environ['CURL_CA_BUNDLE']=""

Here's the pyarrow code that i tried:

from pyarrow import fs
s3 = fs.S3FileSystem(access_key='', secret_key='', endpoint_override=''

I then tried to use s3FS.S3FileSystem API using verify as False but this time it throws error while writing CSV to S3 location:

Error: OSERROR: [Errno 22] The XML you provided was not well-formed or did not validate against our published schema.

import s3fs
s3_fs = s3fs.S3FileSystem(key='', secret='', client_kwargs={'endpoint_url' : '', 'verify': False})
data = pandasTable.to_csv(index=False)
with s3_fs.open('s3://{bucket_name}/{csv_file_path.csv}', 'wb') as out_file:
    out_file.write(data)

I also tried setting curl_ca_bundle to empty string

os.environ['CURL_CA_BUNDLE']=""

0 Answers0