I'm trying to save python list data_issues (of type <class 'list'>) using Glue to an Amazon S3 bucket but I'm getting below error:
Parameter validation failed:
Invalid type for parameter Body, value:
[('document_entity_sdi', Exception("For column, int and YES don't match.")),
('account_status_sdi', Py4JJavaError('An error occurred while calling o80.getCatalogSink.\n', JavaObject id=o654)),
('account_transaction_fcs_status', Py4JJavaError('An error occurred while calling o80.getCatalogSink.\n', JavaObject id=o797)),
('purchase_order_agreement', Py4JJavaError('An error occurred while calling o80.getCatalogSink.\n', JavaObject id=o21565))],
type: <class 'list'>, valid types: <class 'bytes'>, <class 'bytearray'>, file-like object
I tried this workaround to convert the list bytes(data_issues) but doesn't work:
BUCKET = 'bucket_name'
s3 = boto3.client('s3')
keyid = 'keyID'
print("Uploading S3 object with SSE-KMS")
s3.put_object(Bucket=BUCKET,
Key='encrypt-key',
Body=bytes(data_issues),
ServerSideEncryption='aws:kms',
SSEKMSKeyId=keyid)
print("Saving to S3, Done")